How can we help you today? How can we help you today?

DEFAUJLT CURRENT_TIMESTAMP caused deployment error

I changed a datetime column in a table with default value of CURRENT_TIMESTAMP. After comparing with previous version of database the deployment failed with 
"Error Code: 1067. Invalid default value for 'CreationDate'". 

Below is the script generated by the tool:
ALTER TABLE `material` MODIFY COLUMN `CreationDate` datetime NOT NULL DEFAULT 'CURRENT_TIMESTAMP';

Work around: manually removed single quotes and the script executed successfully.

ETsai
0

Comments

1 comment

  • mbourgon
    Same problem here.  A couple fixes would be nice.
    mbourgon
    0

Add comment

Please sign in to leave a comment.