Description:
When comparing two tables using "Database->Sychronize with Any Source...", Workbench is clearly detecting that a column with a specific collation is different from one without a specific collation, but it is not putting the collation in the ALTER TABLE command that it produces.
How to repeat:
Use the following two create statements to create tables in two separate databases:
CREATE TABLE p1.`ORDER_Details` (
`legacyBatchNoIrecno` varchar(30) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
CREATE TABLE p2.`ORDER_Details` (
`legacyBatchNoIrecno` varchar(30) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
(I have called the databases p1 and p2).
Use "Database->Sychronize with Any Source..." to produce changes to be applied. The resulting ALTER TABLE command will be:
ALTER TABLE `p2`.`ORDER_Details`
CHANGE COLUMN `legacyBatchNoIrecno` `legacyBatchNoIrecno` VARCHAR(30) CHARACTER SET 'utf8' NULL DEFAULT NULL ;
When it should be:
ALTER TABLE `ORDER_Details` MODIFY COLUMN `legacyBatchNoIrecno` varchar(30) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL;
Suggested fix:
Make the utility produce the correct ALTER TABLE command.