Skip to content

Commit

Permalink
Fix ON DELETE behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
L1mbxbx committed Nov 29, 2024
1 parent 4fefe02 commit 5ef3313
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions task.sql
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ CREATE TABLE ProductInventory (
WarehouseID INT,
WarehouseAmount INT,
PRIMARY KEY (ID),
FOREIGN KEY (ProductID) REFERENCES Products (ID) ON DELETE NO CASCADE,
FOREIGN KEY (WarehouseID) REFERENCES Warehouses (ID) ON DELETE NO CASCADE
FOREIGN KEY (ProductID) REFERENCES Products (ID) ON DELETE CASCADE,
FOREIGN KEY (WarehouseID) REFERENCES Warehouses (ID) ON DELETE CASCADE
);


Expand Down

0 comments on commit 5ef3313

Please sign in to comment.