I was doing forward engineering, I got this error as ERROR: Error 1022: Can't write; duplicate key in table 'emails', I tried to change name constraints but same error was getting, Can you help me to solve this error thanks
Executing SQL script in server
ERROR: Error 1022: Can't write; duplicate key in table 'emails'
SQL Code:
-- -----------------------------------------------------
-- Table `mydb`.`Emails`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `mydb`.`Emails` (
`EId` INT NOT NULL,
`Type` VARCHAR(45) NULL,
`Email` VARCHAR(45) NULL,
INDEX `ProfileId_idx` (`EId` ASC),
CONSTRAINT `ProfileId`
FOREIGN KEY (`EId`)
REFERENCES `mydb`.`personprofile` (`ProfileId`)
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB
SQL script execution finished: statements: 7 succeeded, 1 failed
Fetching back view definitions in final form.
Nothing to fetch