| Bug #107844 | Sync generating a change to a FK by dropping it even though there is no diff | ||
|---|---|---|---|
| Submitted: | 12 Jul 2022 14:14 | Modified: | 13 Jul 2022 12:43 |
| Reporter: | Christopher Crossley | Email Updates: | |
| Status: | Duplicate | Impact on me: | |
| Category: | MySQL Workbench: Modeling | Severity: | S2 (Serious) |
| Version: | 8.0.29 | OS: | Any |
| Assigned to: | CPU Architecture: | Any | |
[13 Jul 2022 12:43]
MySQL Verification Team
Hello Christopher, Thank you for the bug report. Imho this is duplicate of Bug #99299, please see Bug #99299. Regards, Ashwini Patil

Description: When I sync a table that has no changes it still tries to make a change to an FK. On top of that, it then tries to add an index and drops it in the same statement??? Example table CREATE TABLE `event` ( `evt_id` int(11) NOT NULL AUTO_INCREMENT, `evt_name` varchar(45) NOT NULL, `evt_website` varchar(45) NOT NULL, `evt_description` mediumtext NOT NULL, `evt_ven_id` int(11) DEFAULT NULL, `evt_restrict_tickets` set('Y','N') DEFAULT NULL COMMENT 'Limit tickets based on previous attendance', PRIMARY KEY (`evt_id`), KEY `fk_event_venue1_idx` (`evt_ven_id`) ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; Generated SQL ALTER TABLE `DEV`.`event` DROP COLUMN `evt_ven_id`, ADD COLUMN `evt_ven_id` INT(11) NULL DEFAULT NULL AFTER `evt_description`, ADD INDEX `fk_event_venue1_idx` (`evt_ven_id` ASC) VISIBLE, DROP INDEX `fk_event_venue1_idx` ; How to repeat: Use the table provided and resync.