Handling timestamp defaults

Discussion of open issues, suggestions and bugs regarding database management and administration tools for MySQL
Post Reply
terryweiss
Posts: 5
Joined: Wed 06 May 2015 21:39

Handling timestamp defaults

Post by terryweiss » Thu 22 Oct 2015 20:38

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.

alexa

Re: Handling timestamp defaults

Post by alexa » Fri 23 Oct 2015 13:10

We will investigate this issue and will answer you as soon as possible.

alexa

Re: Handling timestamp defaults

Post by alexa » Fri 23 Oct 2015 15:10

Such a result is returned by the MySQL server itself.

Post Reply