Details
-
Task
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Duplicate
-
None
Description
How to re-recreate bug:
Maria[test]>CREATE TABLE testdefaultnow (createdtime DATETIME DEFAULT NOW());
ERROR 1067 (42000): Invalid default value for 'createdtime'
Why we need it:
While obviously there are ways around this using triggers and/or timestamps. Currently you can only have one timestamp column per table
Maria[test]>CREATE TABLE testdefaultnow (createdtime timestamp default current_timestamp(), updatedtime timestamp default current_timestamp());
ERROR 1293 (HY000): Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause
Ideally we'd be able to create tables that have a create time and an update time.
Attachments
Issue Links
- is duplicated by
-
MDEV-452 Add full support for auto-initialized/updated timestamp and datetime
- Closed