4

Every time I try to create a table using MySQL Workbench 6.3 CE it adds "broken" comments at the end of the script.

Example:

I am trying to create a table called "user". This is what the table should look like: Table Example

However when I click the apply button, the script generates incorrectly:

CREATE TABLE `user` (
  `userid` INT NOT NULL AUTO_INCREMENT COMMENT '',
  `record_status` INT NOT NULL DEFAULT 1 COMMENT '',
  `createdby` VARCHAR(75) NOT NULL COMMENT '',
  `createddate` DATETIME NOT NULL COMMENT '',
  `updatedby` VARCHAR(75) NULL COMMENT '',
  `updateddate` DATETIME NULL COMMENT '',
  `username` INT NOT NULL COMMENT '',
  `password` VARCHAR(75) NULL COMMENT '',
  `firstname` VARCHAR(75) NULL COMMENT '',
  `lastname` VARCHAR(75) NULL COMMENT '',
  `email` VARCHAR(75) NULL COMMENT '',
  `facebook_userid` VARCHAR(75) NULL COMMENT '',
  `email_verified` VARCHAR(75) NULL COMMENT '',
  PRIMARY KEY (`userid`, `username`)  COMMENT '');

The comment in this line should not be there, so the code should be:

PRIMARY KEY (`userid`, `username`));

and the code executes when I paste it into an editor and remove this comment. However I create massive databases daily. (Each with +- 15 tables). I can't keep doing this for each table as it is time consuming.

How can I disable this feature that adds the comments to the script? I don't need them in my databases

3

This is a bug on MySQL Workbench >=6.3.* reported in these cases #76578 and HERE.

This is what ALTER TABLE do:

  • It adds a COMMENT '' on every line of the SQL Script to apply:

enter image description here

I recommended you to downgrade your MySQL Workbench to 6.2.* until they fix this.

Tested in Ubuntu LTS 14.04 and MySQL Workbench 6.3.4.0.

2

Remove all occurence of COMMENT ''. Feel free to leave a comment under this bug. We're working on it to fix it, so stay tuned for upcoming release.

1

Downgrade to 6.2; 6.3 has the bug you describe.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.