Fix error on deleting item with images attached

This commit is contained in:
Pro-Idler 2022-06-06 19:53:23 +02:00
parent c0c95128b0
commit c60c2ba826
2 changed files with 2 additions and 2 deletions

View File

@ -124,7 +124,7 @@ CREATE TABLE IF NOT EXISTS `images` (
CONSTRAINT `fk_images_items1` CONSTRAINT `fk_images_items1`
FOREIGN KEY (`itemid`) FOREIGN KEY (`itemid`)
REFERENCES `items` (`itemid`) REFERENCES `items` (`itemid`)
ON DELETE NO ACTION ON DELETE CASCADE
ON UPDATE NO ACTION) ON UPDATE NO ACTION)
ENGINE = InnoDB; ENGINE = InnoDB;

View File

@ -23,7 +23,7 @@ CREATE TABLE IF NOT EXISTS `images` (
CONSTRAINT `fk_images_items1` CONSTRAINT `fk_images_items1`
FOREIGN KEY (`itemid`) FOREIGN KEY (`itemid`)
REFERENCES `inventory`.`items` (`itemid`) REFERENCES `inventory`.`items` (`itemid`)
ON DELETE NO ACTION ON DELETE CASCADE
ON UPDATE NO ACTION) ON UPDATE NO ACTION)
ENGINE = InnoDB ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8; DEFAULT CHARACTER SET = utf8;