What are the challenges you face when working across database platforms? Take the survey
Options

DEFAUJLT CURRENT_TIMESTAMP caused deployment error

ETsaiETsai Posts: 2 New member
edited April 12, 2018 2:51PM in MySQL Compare
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.

Answers

Sign In or Register to comment.