MySQL Forums
Forum List  »  MySQL Workbench

Schema not full created in MYSQL Workbench
Posted by: Chris Obenberger
Date: June 10, 2015 09:14AM

Hello,

I have been experimenting with MYSQL workbench and tried using the forward engineer option to create my schema. However, two tables did not get created. Here is the output after the wizard ran: The two tables that did not get created were the its_equip_location and its_notes tabels. Thanks for any help. I had no problems setting up the foreign keys. Everything seems ok but obviously I'm missing somethings.

Executing SQL script in server
ERROR: Error 1215: Impossible d'ajouter des contraintes d'index externe
SQL Code:
-- -----------------------------------------------------
-- Table `itsdb`.`its_ equip_location`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `itsdb`.`its_ equip_location` (
`east_location_id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`state_tag` INT UNSIGNED NULL,
`status` TINYINT(2) UNSIGNED NULL,
`region` TINYINT(1) NULL,
`site` INT UNSIGNED NULL,
`building` VARCHAR(45) NULL,
`room` VARCHAR(45) NULL,
`dated_entered` DATE NULL,
`date_moved` DATE NULL,
`staff_id` INT UNSIGNED NULL,
PRIMARY KEY (`east_location_id`),
INDEX `state_tag_idx` (`state_tag` ASC),
INDEX `staff_id_idx` (`staff_id` ASC),
INDEX `site_idx` (`site` ASC),
INDEX `region_idx` (`region` ASC),
INDEX `status_idx` (`status` ASC),
CONSTRAINT `state_tag`
FOREIGN KEY (`state_tag`)
REFERENCES `itsdb`.`its_equipment` (`east_equip_id`)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT `staff_id`
FOREIGN KEY (`staff_id`)
REFERENCES `itsdb`.`its_staff` (`staff_id`)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT `site`
FOREIGN KEY (`site`)
REFERENCES `itsdb`.`its_sites` (`site_id`)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT `region`
FOREIGN KEY (`region`)
REFERENCES `itsdb`.`its_regions` (`region_id`)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT `status`
FOREIGN KEY (`status`)
REFERENCES `itsdb`.`its_equip_status` (`equip_status_id`)
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB

SQL script execution finished: statements: 10 succeeded, 1 failed

Fetching back view definitions in final form.
Nothing to fetch

Options: ReplyQuote


Subject
Views
Written By
Posted
Schema not full created in MYSQL Workbench
2202
June 10, 2015 09:14AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.