Errno 121, duplicate key on write or update?
This is likely because you have named at least one constraint with the same identifier as a column: /* You already have a column named `restaurant` in this table, but are naming the FK CONSTRAINT `restaurant` also… */ CONSTRAINT `restaurant` FOREIGN KEY (`restaurant` ) REFERENCES `mydb`.`restaurants` (`id` ) ON DELETE NO ACTION ON UPDATE NO … Read more