0

我正在尝试将我的 EER 模型与 MySQL Workbench 中的数据库同步,但一个表无法同步。我还检查了我的外键是否与它们引用的列具有相同的数据类型。这是输出:

Executing SQL script in server
ERROR: Error 1005: Can't create table 'veiling.#sql-4f8_47' (errno: 150)

ALTER TABLE `veiling`.`boden` 
  ADD CONSTRAINT `fk_boden_veilingen1`
  FOREIGN KEY (`veilingId` )
  REFERENCES `veiling`.`veilingen` (`veilingId` )
  ON DELETE NO ACTION
  ON UPDATE NO ACTION, 
  ADD CONSTRAINT `fk_boden_gebruikers1`
  FOREIGN KEY (`gebruikerId` )
  REFERENCES `veiling`.`gebruikers` (`gebruikerId` )
  ON DELETE NO ACTION
  ON UPDATE NO ACTION
, ADD INDEX `fk_boden_veilingen1_idx` (`veilingId` ASC) 
, ADD INDEX `fk_boden_gebruikers1_idx` (`gebruikerId` ASC) 
, DROP INDEX `fk_boden_gebruikers1_idx` 
, DROP INDEX `fk_boden_veilingen1_idx` 

SQL script execution finished: statements: 3 succeeded, 1 failed
4

0 回答 0