diff --git a/SQL/Schema.sql b/SQL/Schema.sql index 4789a2d..4a8125c 100644 --- a/SQL/Schema.sql +++ b/SQL/Schema.sql @@ -92,7 +92,7 @@ CREATE TABLE BookingGuest ( bookingId NUMBER NOT NULL, personId NUMBER NOT NULL, PRIMARY KEY(bookingId, personId), - FOREIGN KEY (bookingId) REFERENCES Booking(bookingId), + FOREIGN KEY (bookingId) REFERENCES Booking(bookingId) ON DELETE CASCADE, FOREIGN KEY (personId) REFERENCES Person(personId) ); @@ -100,7 +100,7 @@ CREATE TABLE BookingRoom ( bookingId NUMBER NOT NULL, roomNumber NUMBER NOT NULL, PRIMARY KEY(bookingId, roomNumber), - FOREIGN KEY (bookingId) REFERENCES Booking(bookingId), + FOREIGN KEY (bookingId) REFERENCES Booking(bookingId) ON DELETE CASCADE, FOREIGN KEY (roomNumber) REFERENCES Room(roomNumber) );