source: data_load (1).sql@ d8deee6

main
Last change on this file since d8deee6 was d8deee6, checked in by GitHub <noreply@…>, 3 months ago

Add files via upload

  • Property mode set to 100644
File size: 4.1 KB
Line 
1SET search_path TO project;
2
3TRUNCATE TABLE
4 event_rsvp,
5 attendance,
6 event,
7 guest,
8 priest,
9 church,
10 registrar_booking,
11 registrar,
12 venue_booking,
13 photographer_booking,
14 band_booking,
15 venue,
16 venue_type,
17 photographer,
18 band,
19 wedding,
20 "user"
21RESTART IDENTITY CASCADE;
22
23-- Demo user for sample bookings (use this to test before creating your own wedding)
24INSERT INTO "user"(first_name, last_name, email, password_hash, phone_number, gender, birthday) VALUES
25('Demo', 'User', 'demo@wedding.app', '$2a$10$YourHashedDemoPasswordHere123456789', '+38970000000', 'Other', NULL);
26
27-- Demo weddings to showcase booking features
28INSERT INTO wedding("date", budget, notes, user_id) VALUES
29('2025-06-15', 5000, 'Sample wedding - replace with your own', 1),
30('2025-07-20', 6000, 'Sample wedding - replace with your own', 1);
31
32INSERT INTO church(name, location, contact) VALUES
33('St. Clement Church', 'Skopje', 'contact@church.mk'),
34('St. Panteleimon', 'Nerezi', 'info@church.mk');
35
36INSERT INTO priest(name, contact, church_id) VALUES
37('Father Nikola', '+38970123456', 1),
38('Father Petar', '+38970222333', 2);
39
40INSERT INTO venue_type(type_name) VALUES
41('Restaurant'), ('Wedding Hall'), ('Outdoor Garden');
42
43INSERT INTO venue(name, location, city, address, capacity, menu, phone_number, price_per_guest, type_id) VALUES
44('Lakeside Garden', 'Matka', 'Skopje', 'Matka 12', 200, 'Garden menu', '+38971123456', 35, 3),
45('Royal Hall', 'Centar', 'Skopje', 'Main St 5', 350, 'Full menu', '+38972234567', 45, 2);
46
47INSERT INTO photographer(name, email, phone_number, price_per_hour) VALUES
48('Luna Studio', 'luna@studio.mk', '+38970101010', 55),
49('Golden Frame', 'golden@frame.mk', '+38970202020', 65);
50
51INSERT INTO band(band_name, genre, equipment, phone_number, price_per_hour) VALUES
52('Wedding Vibes', 'Pop', 'Sound + lights', '+38970909090', 80),
53('Balkan Groove', 'Traditional', 'Full instruments', '+38970707070', 95);
54
55INSERT INTO registrar(name, contact, location, working_hours) VALUES
56('Skopje Civil Registry', '+38970123456', 'Skopje', '08:00-16:00'),
57('Centar Registry', '+38970222333', 'Skopje', '09:00-17:00');
58
59INSERT INTO venue_booking("date", start_time, end_time, status, price, venue_id, wedding_id) VALUES
60('2025-06-15', '18:00', '23:00', 'confirmed', 3500, 1, 1),
61('2025-07-20', '17:00', '22:00', 'confirmed', 4500, 2, 2);
62
63INSERT INTO photographer_booking("date", start_time, end_time, status, photographer_id, wedding_id) VALUES
64('2025-06-15', '16:00', '23:00', 'confirmed', 1, 1),
65('2025-07-20', '15:00', '22:00', 'confirmed', 2, 2);
66
67INSERT INTO band_booking("date", start_time, end_time, status, band_id, wedding_id) VALUES
68('2025-06-15', '18:30', '23:00', 'confirmed', 1, 1),
69('2025-07-20', '19:00', '23:00', 'confirmed', 2, 2);
70
71INSERT INTO registrar_booking("date", start_time, end_time, status, registrar_id, wedding_id) VALUES
72('2025-06-15', '10:00', '12:00', 'confirmed', 1, 1),
73('2025-07-20', '10:00', '12:00', 'confirmed', 2, 2);
74
75INSERT INTO event(event_type, "date", start_time, end_time, status, wedding_id) VALUES
76('Ceremony', '2025-06-15', '16:00', '17:30', 'scheduled', 1),
77('Reception', '2025-06-15', '18:00', '23:00', 'scheduled', 1),
78('Ceremony', '2025-07-20', '15:00', '16:30', 'scheduled', 2),
79('Reception', '2025-07-20', '17:00', '22:00', 'scheduled', 2);
80
81INSERT INTO guest(first_name, last_name, email, role, wedding_id) VALUES
82('John', 'Smith', 'john@email.com', 'Best Man', 1),
83('Mary', 'Johnson', 'mary@email.com', 'Bridesmaid', 1),
84('Alex', 'Williams', 'alex@email.com', 'Groomsman', 2),
85('Sarah', 'Brown', 'sarah@email.com', 'Guest', 2);
86
87INSERT INTO event_rsvp(status, response_date, guest_id, event_id) VALUES
88('accepted', '2025-05-20', 1, 1),
89('accepted', '2025-05-21', 2, 2),
90('declined', '2025-05-22', 3, 3),
91('pending', '2025-05-23', 4, 4);
92
93INSERT INTO attendance(status, table_number, role, guest_id, event_id) VALUES
94('attending', 5, 'Guest', 1, 2),
95('attending', 7, 'Guest', 2, 2),
96('attending', 8, 'Guest', 3, 4),
97('not_attending', NULL, 'Guest', 4, 4);
Note: See TracBrowser for help on using the repository browser.