From d434e8fb0f3766a6ef69e81483cf9eebd4ae1f32 Mon Sep 17 00:00:00 2001 From: Imbus <> Date: Wed, 7 Feb 2024 07:20:13 +0100 Subject: [PATCH] Sample data added to migration script --- src/main/resources/migration.sql | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/main/resources/migration.sql b/src/main/resources/migration.sql index 8b26d84..9157905 100644 --- a/src/main/resources/migration.sql +++ b/src/main/resources/migration.sql @@ -47,4 +47,20 @@ CREATE TABLE IF NOT EXISTS Tickets ( reservation_number VARCHAR(50), PRIMARY KEY (showing_id, reservation_number), FOREIGN KEY (showing_id, reservation_number) REFERENCES Reservations(showing_id, reservation_number) -); \ No newline at end of file +); + +INSERT INTO Theaters (name, total_seats) VALUES ('Theater 1', 100); +INSERT INTO Theaters (name, total_seats) VALUES ('Theater 2', 150); + +INSERT INTO Movies (name) VALUES ('Movie 1'); +INSERT INTO Movies (name) VALUES ('Movie 2'); +INSERT INTO Movies (name) VALUES ('Movie 3'); + +INSERT INTO Showings (movie_id, theater_id, show_date) VALUES (1, 1, '2021-01-01'); +INSERT INTO Showings (movie_id, theater_id, show_date) VALUES (1, 1, '2021-01-02'); +INSERT INTO Showings (movie_id, theater_id, show_date) VALUES (1, 2, '2021-01-01'); +INSERT INTO Showings (movie_id, theater_id, show_date) VALUES (2, 2, '2021-01-01'); + +INSERT INTO Users (username, name, address, telephone) VALUES ('user1', 'User 1', 'Address 1', '1234567890'); +INSERT INTO Users (username, name, address, telephone) VALUES ('user2', 'User 2', 'Address 2', '1234567890'); +INSERT INTO Users (username, name, address, telephone) VALUES ('user3', 'User 3', 'Address 3', '1234567890'); \ No newline at end of file