title: MySql Workbench syntax error
body: <p><strong>EDIT</strong> : Please read the problem before you post your answer :( I know UNIQUE shouldn't be here. I use MySQL Workbench to organize my database and, for an unknown reason, it decided to put UNIQUE here since this morning. That's the problem.</p>
  
  <p>When i create 10 tables with many relationships, i synchronize my database with the diagram from MySql Workbench. Since i have some "UNIQUE" there and there, i can't really synchronize anything because i got errors. And copy pasting all the statements into notepad to debug them is not an option :p</p>
  
  <p>The question is: why MySql Workbench is putting all these wrong UNIQUE in the create table statements ?</p>
  
  <p>Thank you for your help :)</p>
  
  <hr>
  
  <p>I have a weird error when i try to synchronize my model with the database. </p>
  
  <p>The create table statement makes an error: </p>
  
  <pre><code>CREATE TABLE IF NOT EXISTS `barometres`.`brm_questions` ( 
  `id` INT(10) UNIQUE UNSIGNED NOT NULL AUTO_INCREMENT, 
  `theme_id` INT(10) UNIQUE UNSIGNED NOT NULL, 
  `question_type_id` TINYINT(3) NOT NULL, 
  `type` TINYINT(1) NULL DEFAULT NULL, 
  `reference` TINYINT(1) NULL DEFAULT NULL, 
  `created_at` DATETIME NOT NULL, 
  `updated_at` DATETIME NULL DEFAULT NULL, 
  `deleted_at` DATETIME NULL DEFAULT NULL, 
  INDEX `fk_brm_questions_brm_themes1_idx` (`theme_id` ASC), 
  INDEX `fk_brm_questions_brn_questions-types1_idx` (`question_type_id` ASC), 
  PRIMARY KEY (`id`), 
  CONSTRAINT `fk_brm_questions_brm_themes1` 
  FOREIGN KEY (`theme_id`) 
  REFERENCES `barometres`.`brm_themes` (`id`) 
  ON DELETE NO ACTION 
  ON UPDATE NO ACTION, 
  CONSTRAINT `fk_brm_questions_brn_questions-types1` 
  FOREIGN KEY (`question_type_id`) 
  REFERENCES `barometres`.`brn_questions-types` (`id`) 
  ON DELETE NO ACTION 
  ON UPDATE NO ACTION) 
  ENGINE = InnoDB 
  DEFAULT CHARACTER SET = utf8 
  </code></pre>
  
  <p>This is normal, the id column should not be marked as UNIQUE (since i didn't check it in Workbench), and the UNSIGNED should be before the UNIQUE anyway. </p>
  
  <p>Because the UNSIGNED is after the UNIQUE, i got this error for each table in my model: </p>
  
  <pre><code>ERROR: Error 1064: 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 'UNSIGNED NOT NULL AUTO_INCREMENT, 
  `theme_id` INT(10) UNIQUE UNSIGNED NOT NULL,' at line 2 
  </code></pre>
  
  <p>As you can see, the theme_id column is also marked as UNIQUE even if i didn't check it too. </p>
  
  <p>All my tables have the same problem and i really don't know how to solve it without manually change all statements in notepad. </p>
  
  <p>Do you have any idea why workbench has this behavior ? This is Workbench 6.3.9, and the same model do the same error on 6.3.6 </p>
  
  <p>Thank you very much for your help. </p>
  
  <p>Anthony</p>