From ae01fb6440f987a442c5d511362722b57cfe267f Mon Sep 17 00:00:00 2001 From: sergiodt Date: Tue, 18 Jun 2024 17:00:15 +0200 Subject: [PATCH] hotFix delete unique refs #6281 --- .../11109-whiteCarnation/00-firstScript.sql | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 db/versions/11109-whiteCarnation/00-firstScript.sql diff --git a/db/versions/11109-whiteCarnation/00-firstScript.sql b/db/versions/11109-whiteCarnation/00-firstScript.sql new file mode 100644 index 000000000..a1ff19815 --- /dev/null +++ b/db/versions/11109-whiteCarnation/00-firstScript.sql @@ -0,0 +1,14 @@ +-- Place your SQL code here + +USE vn; + +ALTER TABLE vn.itemShelving DROP FOREIGN KEY itemShelvingBuy_FK; +ALTER TABLE vn.itemShelving DROP FOREIGN KEY itemShelving_fk2; +ALTER TABLE vn.itemShelving DROP INDEX itemShelving_UN; + +ALTER TABLE vn.itemShelving ADD CONSTRAINT itemShelving_fk2 FOREIGN KEY (shelvingFk) REFERENCES vn.shelving(code) ON DELETE CASCADE ON UPDATE CASCADE; +ALTER TABLE vn.itemShelving ADD CONSTRAINT itemShelvingBuy_FK FOREIGN KEY (buyFk) REFERENCES vn.buy(id) ON DELETE RESTRICT ON UPDATE RESTRICT; + + + +