Description:
When running Synchronize Model, a table that needs to update its comment and a row or index will have a malformed ALTER TABLE statement. This causes the synchronization to fail.
Example
ALTER TABLE `WTP_Dev`.`repQuestion_support`
CHANGE COLUMN `points` `points` INT(10) UNSIGNED NOT NULL COMMENT 'Number of points the user contributed to the question\n' ,
DROP INDEX `ind__id_question` ,
ADD INDEX `ind__id_question` (`id_question` DESC);
, COMMENT = 'TYPE: TRANSACTIONAL\nDESC: Record of user points contributed to repQuestions.' ;
It should be:
ALTER TABLE `WTP_Dev`.`repQuestion_support`
COMMENT = 'TYPE: TRANSACTIONAL\nDESC: Record of user points contributed to repQuestions.',
CHANGE COLUMN `points` `points` INT(10) UNSIGNED NOT NULL COMMENT 'Number of points the user contributed to the question\n' ,
DROP INDEX `ind__id_question` ,
ADD INDEX `ind__id_question` (`id_question` DESC);
How to repeat:
Change a table's row or index, and comment, then run Synchronize Model.
Suggested fix:
Move the COMMENT part of the query before other operations.