source: database/dml/data_load.sql

main
Last change on this file was 95cf703, checked in by teo <teodorbogoeski@…>, 4 months ago

Initial commit: FRRUAS CLI prototype

  • Property mode set to 100644
File size: 12.2 KB
Line 
1SET search_path TO project;
2
3TRUNCATE TABLE reservations RESTART IDENTITY CASCADE;
4TRUNCATE TABLE resources RESTART IDENTITY CASCADE;
5TRUNCATE TABLE locations RESTART IDENTITY CASCADE;
6TRUNCATE TABLE resource_types RESTART IDENTITY CASCADE;
7TRUNCATE TABLE users RESTART IDENTITY CASCADE;
8TRUNCATE TABLE user_types RESTART IDENTITY CASCADE;
9
10INSERT INTO user_types (type_name, description) VALUES
11 ('Student', 'Students can view resource availability and access permitted resources for study and project work'),
12 ('Teaching Staff', 'Faculty members who can reserve resources for lectures, labs, office hours, and research activities'),
13 ('Administrator', 'System administrators who manage resources, approve reservations, and analyze usage data');
14
15-- All seed users have password: password123
16INSERT INTO users (first_name, last_name, email, password, type_id) VALUES
17 ('Ana', 'Petrovska', 'ana.petrovska@finki.ukim.mk', '$2b$12$Y.WHm77o3R.5UXdGKzdpru4B08oGuzP1Ifdvgd8/jBeB2KgxQjZQW', 3),
18 ('Marko', 'Dimitrovski', 'marko.dimitrovski@finki.ukim.mk', '$2b$12$Y.WHm77o3R.5UXdGKzdpru4B08oGuzP1Ifdvgd8/jBeB2KgxQjZQW', 3),
19 ('Elena', 'Stojanova', 'elena.stojanova@finki.ukim.mk', '$2b$12$Y.WHm77o3R.5UXdGKzdpru4B08oGuzP1Ifdvgd8/jBeB2KgxQjZQW', 2),
20 ('Nikola', 'Trajkovski', 'nikola.trajkovski@finki.ukim.mk', '$2b$12$Y.WHm77o3R.5UXdGKzdpru4B08oGuzP1Ifdvgd8/jBeB2KgxQjZQW', 2),
21 ('Ivana', 'Kostadinova', 'ivana.kostadinova@finki.ukim.mk', '$2b$12$Y.WHm77o3R.5UXdGKzdpru4B08oGuzP1Ifdvgd8/jBeB2KgxQjZQW', 2),
22 ('Aleksandar', 'Georgieski', 'aleksandar.georgieski@finki.ukim.mk', '$2b$12$Y.WHm77o3R.5UXdGKzdpru4B08oGuzP1Ifdvgd8/jBeB2KgxQjZQW', 2),
23 ('Stefan', 'Nikolov', 'stefan.nikolov@students.finki.ukim.mk', '$2b$12$Y.WHm77o3R.5UXdGKzdpru4B08oGuzP1Ifdvgd8/jBeB2KgxQjZQW', 1),
24 ('Martina', 'Ilievska', 'martina.ilievska@students.finki.ukim.mk', '$2b$12$Y.WHm77o3R.5UXdGKzdpru4B08oGuzP1Ifdvgd8/jBeB2KgxQjZQW', 1),
25 ('David', 'Angelovski', 'david.angelovski@students.finki.ukim.mk', '$2b$12$Y.WHm77o3R.5UXdGKzdpru4B08oGuzP1Ifdvgd8/jBeB2KgxQjZQW', 1),
26 ('Teodora', 'Manceva', 'teodora.manceva@students.finki.ukim.mk', '$2b$12$Y.WHm77o3R.5UXdGKzdpru4B08oGuzP1Ifdvgd8/jBeB2KgxQjZQW', 1),
27 ('Filip', 'Ristovski', 'filip.ristovski@students.finki.ukim.mk', '$2b$12$Y.WHm77o3R.5UXdGKzdpru4B08oGuzP1Ifdvgd8/jBeB2KgxQjZQW', 1),
28 ('Milena', 'Jovanovska', 'milena.jovanovska@students.finki.ukim.mk', '$2b$12$Y.WHm77o3R.5UXdGKzdpru4B08oGuzP1Ifdvgd8/jBeB2KgxQjZQW', 1);
29
30INSERT INTO resource_types (type_name, is_physical) VALUES
31 ('Classroom', TRUE),
32 ('Computer Laboratory', TRUE),
33 ('Projector', TRUE),
34 ('Conference Room', TRUE),
35 ('3D Printer', TRUE),
36 ('Software License', FALSE),
37 ('Virtual Machine', FALSE),
38 ('Online Service', FALSE);
39
40INSERT INTO locations (building, room) VALUES
41 ('FINKI-A', '101'),
42 ('FINKI-A', '102'),
43 ('FINKI-A', '201'),
44 ('FINKI-A', '202'),
45 ('FINKI-A', '301'),
46 ('FINKI-B', 'Lab 1'),
47 ('FINKI-B', 'Lab 2'),
48 ('FINKI-B', 'Lab 3'),
49 ('FINKI-B', 'Lab 4'),
50 ('TMF', 'Conference Hall'),
51 ('TMF', 'Meeting Room A'),
52 ('TMF', 'Meeting Room B'),
53 ('Library', 'Study Room 1'),
54 ('Library', 'Study Room 2');
55
56INSERT INTO resources (name, description, available_from, available_to, available_weekends, type_id, location_id) VALUES
57 ('Classroom 101', 'Standard classroom with 60 seats, whiteboard, and built-in projector', '08:00', '20:00', FALSE, 1, 1),
58 ('Classroom 102', 'Small classroom with 30 seats, suitable for seminars and group work', '08:00', '20:00', FALSE, 1, 2),
59 ('Lecture Hall 201', 'Large lecture hall with 150 seats, amphitheater style seating', '08:00', '22:00', TRUE, 1, 3),
60 ('Classroom 202', 'Standard classroom with 45 seats, equipped with smart board', '08:00', '20:00', FALSE, 1, 4),
61 ('Programming Lab 1', 'Computer lab with 25 workstations, Linux/Windows dual boot, for programming courses', '08:00', '22:00', TRUE, 2, 6),
62 ('Programming Lab 2', 'Computer lab with 25 workstations, focused on web development tools', '08:00', '22:00', TRUE, 2, 7),
63 ('Networking Lab', 'Specialized lab with network equipment, routers, switches for hands-on practice', '09:00', '18:00', FALSE, 2, 8),
64 ('Database Lab', 'Lab with 20 workstations pre-configured with PostgreSQL, MySQL, Oracle', '08:00', '20:00', FALSE, 2, 9),
65 ('Portable Projector Epson EB-X51', 'Portable projector 3800 lumens, XGA resolution, HDMI and VGA inputs', '08:00', '20:00', TRUE, 3, NULL),
66 ('Portable Projector BenQ MH733', 'Full HD portable projector 4000 lumens, ideal for large rooms', '08:00', '20:00', TRUE, 3, NULL),
67 ('Main Conference Hall', 'Large conference hall with 100 seats, video conferencing system, recording equipment', '08:00', '20:00', FALSE, 4, 10),
68 ('Meeting Room A', 'Medium meeting room with 20 seats, whiteboard, TV screen for presentations', '08:00', '18:00', FALSE, 4, 11),
69 ('Meeting Room B', 'Small meeting room with 10 seats, suitable for thesis defenses and small meetings', '08:00', '18:00', FALSE, 4, 12),
70 ('Prusa i3 MK3S+', '3D printer for student projects, PLA/PETG filaments, max build volume 25x21x21cm', '09:00', '17:00', FALSE, 5, 6),
71 ('Ultimaker S3', 'Professional dual-extrusion 3D printer, supports various materials', '09:00', '17:00', FALSE, 5, 6),
72 ('Study Room 1', 'Quiet study room in library with 8 seats, power outlets, WiFi', '08:00', '22:00', TRUE, 1, 13),
73 ('Study Room 2', 'Group study room in library with 12 seats and whiteboard', '08:00', '22:00', TRUE, 1, 14);
74
75INSERT INTO resources (name, description, available_from, available_to, available_weekends, type_id, location_id) VALUES
76 ('MATLAB Academic License', 'Network license for MATLAB R2024a with all toolboxes, 50 concurrent users', '00:00', '23:59', TRUE, 6, NULL),
77 ('JetBrains Educational Pack', 'Access to IntelliJ IDEA, PyCharm, WebStorm, and other JetBrains IDEs', '00:00', '23:59', TRUE, 6, NULL),
78 ('Microsoft Azure Dev Tools', 'Azure subscription for students with $100 credit and free services', '00:00', '23:59', TRUE, 6, NULL),
79 ('Adobe Creative Cloud', 'Full Creative Cloud suite - Photoshop, Illustrator, Premiere Pro, etc.', '00:00', '23:59', TRUE, 6, NULL),
80 ('GPU Compute Server', 'Virtual server with NVIDIA Tesla T4, 16GB VRAM, for ML/AI projects', '00:00', '23:59', TRUE, 7, NULL),
81 ('Development VM Pool', 'Pool of 10 Ubuntu VMs, 4 vCPU, 8GB RAM each, for student projects', '00:00', '23:59', TRUE, 7, NULL),
82 ('Windows Server Instance', 'Windows Server 2022 VM for .NET development and testing', '00:00', '23:59', TRUE, 7, NULL),
83 ('GitHub Enterprise', 'GitHub Enterprise account with unlimited private repositories', '00:00', '23:59', TRUE, 8, NULL),
84 ('AWS Academy Sandbox', 'AWS sandbox environment for cloud computing courses', '00:00', '23:59', TRUE, 8, NULL),
85 ('Google Cloud Credits', 'Google Cloud Platform credits for student projects and research', '00:00', '23:59', TRUE, 8, NULL);
86
87INSERT INTO reservations (start_time, end_time, status, purpose, created_at, recurrence_group_id, user_id, approved_by, resource_id) VALUES
88 ('2026-02-03 09:00:00', '2026-02-03 11:00:00', 'completed', 'Database Systems Lecture - Week 1', '2026-01-15 10:00:00', 'a1b2c3d4-e5f6-4789-abcd-ef0123456789', 3, 1, 3),
89 ('2026-02-10 09:00:00', '2026-02-10 11:00:00', 'approved', 'Database Systems Lecture - Week 2', '2026-01-15 10:00:00', 'a1b2c3d4-e5f6-4789-abcd-ef0123456789', 3, 1, 3),
90 ('2026-02-17 09:00:00', '2026-02-17 11:00:00', 'approved', 'Database Systems Lecture - Week 3', '2026-01-15 10:00:00', 'a1b2c3d4-e5f6-4789-abcd-ef0123456789', 3, 1, 3),
91 ('2026-02-24 09:00:00', '2026-02-24 11:00:00', 'pending', 'Database Systems Lecture - Week 4', '2026-01-15 10:00:00', 'a1b2c3d4-e5f6-4789-abcd-ef0123456789', 3, NULL, 3);
92
93INSERT INTO reservations (start_time, end_time, status, purpose, created_at, recurrence_group_id, user_id, approved_by, resource_id) VALUES
94 ('2026-02-04 14:00:00', '2026-02-04 16:00:00', 'completed', 'Web Development Lab - Week 1', '2026-01-16 09:30:00', 'b2c3d4e5-f6a7-4890-bcde-f01234567890', 4, 1, 5),
95 ('2026-02-11 14:00:00', '2026-02-11 16:00:00', 'approved', 'Web Development Lab - Week 2', '2026-01-16 09:30:00', 'b2c3d4e5-f6a7-4890-bcde-f01234567890', 4, 1, 5),
96 ('2026-02-18 14:00:00', '2026-02-18 16:00:00', 'approved', 'Web Development Lab - Week 3', '2026-01-16 09:30:00', 'b2c3d4e5-f6a7-4890-bcde-f01234567890', 4, 1, 5);
97
98INSERT INTO reservations (start_time, end_time, status, purpose, created_at, recurrence_group_id, user_id, approved_by, resource_id) VALUES
99 ('2026-02-05 15:00:00', '2026-02-05 18:00:00', 'approved', 'Group study session for Algorithms exam', '2026-02-01 14:00:00', NULL, 7, 2, 16),
100 ('2026-02-06 10:00:00', '2026-02-06 13:00:00', 'approved', 'Project team meeting - Software Engineering', '2026-02-02 11:30:00', NULL, 8, 2, 17),
101 ('2026-02-07 09:00:00', '2026-02-07 12:00:00', 'pending', 'Thesis writing session', '2026-02-03 08:00:00', NULL, 9, NULL, 16);
102
103INSERT INTO reservations (start_time, end_time, status, purpose, created_at, recurrence_group_id, user_id, approved_by, resource_id) VALUES
104 ('2026-02-10 14:00:00', '2026-02-10 16:00:00', 'approved', 'Master thesis defense - Machine Learning topic', '2026-01-25 09:00:00', NULL, 5, 1, 13);
105
106INSERT INTO reservations (start_time, end_time, status, purpose, created_at, recurrence_group_id, user_id, approved_by, resource_id) VALUES
107 ('2026-02-08 09:00:00', '2026-02-08 17:00:00', 'approved', 'Guest lecture requiring portable projector', '2026-02-01 08:00:00', NULL, 6, 2, 9),
108 ('2026-02-12 10:00:00', '2026-02-12 12:00:00', 'rejected', 'Projector needed but already booked', '2026-02-05 15:00:00', NULL, 4, 1, 9);
109
110INSERT INTO reservations (start_time, end_time, status, purpose, created_at, recurrence_group_id, user_id, approved_by, resource_id) VALUES
111 ('2026-02-06 09:00:00', '2026-02-06 17:00:00', 'approved', 'Printing prototype for IoT course project', '2026-02-01 16:00:00', NULL, 10, 2, 14),
112 ('2026-02-07 09:00:00', '2026-02-07 17:00:00', 'pending', '3D print parts for robotics competition', '2026-02-04 10:00:00', NULL, 11, NULL, 15);
113
114INSERT INTO reservations (start_time, end_time, status, purpose, created_at, recurrence_group_id, user_id, approved_by, resource_id) VALUES
115 ('2026-02-01 00:00:00', '2026-06-30 23:59:00', 'approved', 'MATLAB license for numerical analysis course', '2026-01-20 11:00:00', NULL, 3, 1, 18),
116 ('2026-02-01 00:00:00', '2026-06-30 23:59:00', 'approved', 'GPU server access for deep learning research', '2026-01-22 14:00:00', NULL, 5, 1, 23),
117 ('2026-02-01 00:00:00', '2026-06-30 23:59:00', 'approved', 'AWS Academy access for cloud computing course', '2026-01-23 09:00:00', NULL, 4, 2, 27);
118
119INSERT INTO reservations (start_time, end_time, status, purpose, created_at, recurrence_group_id, user_id, approved_by, resource_id) VALUES
120 ('2026-02-05 00:00:00', '2026-03-05 23:59:00', 'approved', 'Development VM for semester project', '2026-02-01 08:30:00', NULL, 7, 2, 24),
121 ('2026-02-05 00:00:00', '2026-03-05 23:59:00', 'pending', 'Windows Server VM for .NET project', '2026-02-04 12:00:00', NULL, 12, NULL, 25);
122
123INSERT INTO reservations (start_time, end_time, status, purpose, created_at, recurrence_group_id, user_id, approved_by, resource_id) VALUES
124 ('2026-02-15 10:00:00', '2026-02-15 12:00:00', 'cancelled', 'Meeting cancelled due to scheduling conflict', '2026-02-01 09:00:00', NULL, 6, 1, 12);
125
126INSERT INTO reservations (start_time, end_time, status, purpose, created_at, recurrence_group_id, user_id, approved_by, resource_id) VALUES
127 ('2026-02-06 08:00:00', '2026-02-06 10:00:00', 'approved', 'Morning lecture - Operating Systems', '2026-01-20 10:00:00', NULL, 3, 1, 1),
128 ('2026-02-06 10:15:00', '2026-02-06 12:15:00', 'approved', 'Computer Networks Lecture', '2026-01-20 10:30:00', NULL, 4, 1, 1),
129 ('2026-02-06 14:00:00', '2026-02-06 16:00:00', 'approved', 'Software Engineering Seminar', '2026-01-20 11:00:00', NULL, 5, 1, 1);
130
131INSERT INTO reservations (start_time, end_time, status, purpose, created_at, recurrence_group_id, user_id, approved_by, resource_id) VALUES
132 ('2026-02-05 09:00:00', '2026-02-05 13:00:00', 'completed', 'Network configuration practice - CCNA prep', '2026-01-28 14:00:00', NULL, 4, 2, 7),
133 ('2026-02-12 09:00:00', '2026-02-12 13:00:00', 'approved', 'Firewall and security lab session', '2026-02-03 09:00:00', NULL, 4, 2, 7);
Note: See TracBrowser for help on using the repository browser.