Skip to content

Commit 0cb8da0

Browse files
authored
Make Shipping FK deliveryAgent_flightCodePersonId "on delete set null" (#270)
1 parent eafe159 commit 0cb8da0

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
INSERT IGNORE INTO SchemaStatus (scriptName, schemaStatus) VALUES ('2025_04_30_Shipping_fk_personId_on_delete_set_null.sql', 'ONGOING');
2+
3+
ALTER TABLE Shipping
4+
DROP CONSTRAINT Shipping_ibfk_4;
5+
6+
ALTER TABLE Shipping
7+
ADD CONSTRAINT Shipping_ibfk_4
8+
FOREIGN KEY (deliveryAgent_flightCodePersonId)
9+
REFERENCES Person (personId)
10+
ON DELETE SET NULL ON UPDATE CASCADE;
11+
12+
UPDATE SchemaStatus SET schemaStatus = 'DONE' WHERE scriptName = '2025_04_30_Shipping_fk_personId_on_delete_set_null.sql';

0 commit comments

Comments
 (0)