#1067 - Invalid default value
KeithK
Posts: 1 New member
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?
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?
Answers
It seems like Mysql Compare Bundle does not work with later versions of MariaDB. The comparison works but the deployment script does not work because it puts an extra quote around the default value which makes a syntax error.
Here an example of how it makes an syntax error at my server:
The DEFAULT ''0'' should be DEFAULT '0'
I hope the dev team will solve this error in the application.
Should be great when the developers should solve this....