Menu

#807 Create table: CURRENT_TIMESTAMP not possible for timestamp fields

Fixed
nobody
None
Default
Enhancement
2009-05-19
2008-10-17
Anonymous
No

Originally created by: dhahler@gmail.com

The "Create table..." dialog does not allow setting the default to
CURRENT_TIMESTAMP for a timestamp field.

The "Default Value" field is a text field here and HeidiSQL appears to
automatically wrap the value given here in quotes for the CREATE TABLE
statement.
This is what HeidiSQL executes when using "CURRENT_TIMESTAMP" for the
default value:
CREATE TABLE [...] `timestamp` TIMESTAMP DEFAULT 'CURRENT_TIMESTAMP' [...]

It seems like the best fix would be to use the same logic/fields like with
"Update Column", where you have a combination of dropdown ("No default
value", "NULL", "CURRENT_TIMESTAMP", "Custom string ...") and input field.

Version currently used (if relevant)?
HeidiSQL revision: 1866

Discussion

  • Anonymous

    Anonymous - 2009-05-19

    Originally posted by: a...@anse.de

    Fixed by the recently implemented new table editor

    Status: Fixed

     
MongoDB Logo MongoDB