i'm trying to build up a database to learn more about Triggers in MySQL.
So i created an database model with the mysql-workbench. If i try to synchronize the model with the mysql-server, i get a 1064 syntax error:
Executing SQL script in server
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 ') NOT NULL ,
PRIMARY KEY (`employee_id`, `accounts_id`) ,
INDEX `fk_accountA' at line 4
CREATE TABLE IF NOT EXISTS `pzedb`.`accountAmounts` (
`employee_id` INT(11) NOT NULL ,
`accounts_id` INT(11) NOT NULL ,
`accountAmount` DOUBLE(11) NOT NULL ,
PRIMARY KEY (`employee_id`, `accounts_id`) ,
INDEX `fk_accountAmounts_employee1` (`employee_id` ASC) ,
INDEX `fk_accountAmounts_accounts1` (`accounts_id` ASC) ,
CONSTRAINT `fk_accountAmounts_employee1`
FOREIGN KEY (`employee_id` )
REFERENCES `pzedb`.`employee` (`id` )
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT `fk_accountAmounts_accounts1`
FOREIGN KEY (`accounts_id` )
REFERENCES `pzedb`.`accounts` (`id` )
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB
DEFAULT CHARACTER SET = latin1
COLLATE = latin1_swedish_ci
SQL script execution finished: statements: 11 succeeded, 1 failed
I tried to change the field to VARCHAR and what should i say it worked. I changed other fields to DOUBLE and get the same error.
Is there something wrong or i'm just too stupid to use the workbench?
My OS: Debian 7.1 MySQL: 5.5.31-0+wheezy1 Workbench: 5.2.40 rev 8790