#1067 - Invalid default value

Error: #1067 - Invalid default value
happens with deployment script from MySQL compare
Caused by statement like: MODIFY COLUMN `created_at` timestamp NULL DEFAULT 'NULL';

This statement should be:
MODIFY COLUMN `created_at` timestamp NULL DEFAULT NULL;

(without the single quotes around 2nd NULL)

OR

MODIFY COLUMN `created_at` timestamp NULL;

(without DEFAULT 'NULL')

Also, the addition of DEFAULT 'NULL' causes unnecessary difference in database comparisons. I'm not sure, but it seems DEFAULT 'NULL' is coming from a new version of MySQL Database.

How are people handling this issue?


Sign In or Register to comment.