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 ad3ff6f commit 4fefe02
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 ACTION,
FOREIGN KEY (WarehouseID) REFERENCES Warehouses (ID) ON DELETE NO ACTION
FOREIGN KEY (ProductID) REFERENCES Products (ID) ON DELETE NO CASCADE,
FOREIGN KEY (WarehouseID) REFERENCES Warehouses (ID) ON DELETE NO CASCADE
);


Expand Down

0 comments on commit 4fefe02

Please sign in to comment.