Handling timestamp defaults
Posted: Thu 22 Oct 2015 20:38
Hi. I am using 6.3 with latest Mariadb. I have tables with a structure as follows:
MySQL only allows current_timestamp on one timestamp field per table, so this schema is valid and works on the DB.
But when forge generate or compares this is what I end up with is:
Which is not the same thing. Worse is that it is not valid.
Do you have any guidance for this?
t.
Code: Select all
created timestamp not null default now(),
updated timestamp null default null on update current_timestamp,
But when forge generate or compares this is what I end up with is:
Code: Select all
created timestamp not null default '0000-00-00 00:00:00' on update current_timestamp,
updated timestamp null default null on update current_timestamp,
Do you have any guidance for this?
t.