Page 1 of 1

Handling timestamp defaults

Posted: Thu 22 Oct 2015 20:38
by terryweiss
Hi. I am using 6.3 with latest Mariadb. I have tables with a structure as follows:

Code: Select all

created	timestamp not null default now(),
updated	timestamp null default null on update current_timestamp,
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:

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,
Which is not the same thing. Worse is that it is not valid.

Do you have any guidance for this?

t.

Re: Handling timestamp defaults

Posted: Fri 23 Oct 2015 13:10
by alexa
We will investigate this issue and will answer you as soon as possible.

Re: Handling timestamp defaults

Posted: Fri 23 Oct 2015 15:10
by alexa
Such a result is returned by the MySQL server itself.