Bug in workbench data migration script
Hi-
I originally posted this under Newbies, and someone suggested that I post it as a bug now that I found a solution. I couldn't find a thread for just bug reporting.
--
My SQL workbench v. 6.3.4.0 64 bit.
Migrating from Access .accdb (2010)
I get this error (or something like it) on most of my tables during the migration SQL script review:
ERROR: Error executing 'CREATE TABLE IF NOT EXISTS `InvertData_TESTCopy3_be`.`tblPCRsamples` (
`VialID` VARCHAR(50) NULL COMMENT '',
`PCRPlate` VARCHAR(50) NOT NULL COMMENT '',
`PCRWell` VARCHAR(50) NOT NULL COMMENT '',
`PCRresult` VARCHAR(255) NULL COMMENT '',
`fivecycleredo` VARCHAR(10) NULL COMMENT '',
`FinalResult` VARCHAR(50) NULL COMMENT '',
PRIMARY KEY (`PCRPlate`, `PCRWell`) COMMENT '',
CONSTRAINT `{94D83037-86D5-49E4-B0FD-34AE34CEDE1A}`
FOREIGN KEY (`PCRWell`)
REFERENCES `InvertData_TESTCopy3_be`.`tblListWells` (`Well`)
ON DELETE RESTRICT
ON UPDATE RESTRICT,
CONSTRAINT `{E3A31516-8923-4698-A429-3F244CA968DF}`
FOREIGN KEY (`FinalResult`)
REFERENCES `InvertData_TESTCopy3_be`.`tblListPCRResults` (`FinalResult`)
ON DELETE RESTRICT
ON UPDATE RESTRICT,
CONSTRAINT `{80503C8F-1844-4E52-BC34-935DF141BFBB}`
FOREIGN KEY (`VialID`)
REFERENCES `InvertData_TESTCopy3_be`.`tblMaster` (`VialID`)
ON DELETE CASCADE
ON UPDATE CASCADE,
CONSTRAINT `{2D98A0ED-3A04-413D-976D-3787C91A9FCF}`
FOREIGN KEY (`PCRPlate`)
REFERENCES `InvertData_TESTCopy3_be`.`tblPCRplates` (`PCRPlate`)
ON DELETE CASCADE
ON UPDATE CASCADE)'
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'COMMENT '',
CONSTRAINT `{94D83037-86D5-49E4-B0FD-34AE34CEDE1A}`
FOREIGN KE' at line 8.
SQL Error: 1064
FIX-
But, I did figure out the problem. For some reason it didn't like the comment after INDEX `{80503C8F-1844-4E52-BC34-935DF141BFBB}` (`VialID` ASC) COMMENT '',
INDEX `VialID` (`VialID` ASC) COMMENT '',
So I deleted the COMMENT '' to make it look like this:
INDEX `{80503C8F-1844-4E52-BC34-935DF141BFBB}` (`VialID` ASC),
INDEX `VialID` (`VialID` ASC),
And locked the edited scripts that were automatically produced by MySQL workbench.
It had no problem with the previous COMMENT '' commands, so I left those.
Then it worked.
The rest of the import steps worked (mostly).