Sample data added to migration script

This commit is contained in:
Imbus 2024-02-07 07:20:13 +01:00
parent 9665dec8ae
commit d434e8fb0f

View file

@ -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)
);
);
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');