Files
aux-bieaux-legumes/local/modules/DigressivePrice/Config/update-2.0.sql
2021-04-08 15:57:38 +02:00

12 lines
470 B
SQL

-- ---------------------------------------------------------------------
-- Update the foreign key to provide automatic delete
-- ---------------------------------------------------------------------
ALTER TABLE `digressive_price` DROP FOREIGN KEY `fk_product_digressive`;
ALTER TABLE `digressive_price` ADD CONSTRAINT `fk_product_digressive`
FOREIGN KEY (`product_id`)
REFERENCES `product` (`id`)
ON UPDATE RESTRICT
ON DELETE CASCADE;