On Wed, Jul 04, 2007 at 03:41:28PM +0100, Jess Robinson wrote:
> Perversely, I thought mysql didnt like defaults that were functions? (thus 
> the silly timestamp type thing)

You're right.  It works for TIMESTAMP columns but not DATETIME.  Of course,
TIMESTAMP columns default to NOW() anyway!

Oh mysql, I love you so much!

I don't like this idea, but (continuing to assume that this is mysql < 4.1.2)
you could have last_modified TIMESTAMP, created TIMESTAMP -- updates will only
change the first one, and the second automatically defaults to insertion time.

hdp.

_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/

Reply via email to