[Dbix-class] applying row level methods via Schema::Loader
Hans Dieter Pearcey
hdp at pobox.com
Wed Jul 4 16:04:29 GMT 2007
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.
More information about the Dbix-class