add test-seeds
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,3 +1,4 @@
|
||||
/target
|
||||
.history
|
||||
/frontend/node_modules/*
|
||||
db.sqlite
|
||||
|
30
seeds_test.sql
Normal file
30
seeds_test.sql
Normal file
@@ -0,0 +1,30 @@
|
||||
-- Insert test users
|
||||
INSERT INTO user (uuid, name) VALUES
|
||||
('550e8400-e29b-41d4-a716-446655440001', 'Alice Johnson'),
|
||||
('550e8400-e29b-41d4-a716-446655440002', 'Bob Smith'),
|
||||
('550e8400-e29b-41d4-a716-446655440003', 'Carol Williams'),
|
||||
('550e8400-e29b-41d4-a716-446655440004', 'David Brown'),
|
||||
('550e8400-e29b-41d4-a716-446655440005', 'Emma Davis');
|
||||
|
||||
-- Insert test cameras
|
||||
INSERT INTO camera (uuid, desc, name) VALUES
|
||||
('750e8400-e29b-41d4-a716-446655440001', 'Main entrance security camera', 'Front Door Cam'),
|
||||
('750e8400-e29b-41d4-a716-446655440002', 'Parking lot surveillance', 'Parking Lot Cam'),
|
||||
('750e8400-e29b-41d4-a716-446655440003', 'Back entrance monitoring', 'Rear Exit Cam'),
|
||||
('750e8400-e29b-41d4-a716-446655440004', 'Wildlife observation camera in forest', 'Forest Trail Cam'),
|
||||
('750e8400-e29b-41d4-a716-446655440005', NULL, 'Office Hallway Cam'),
|
||||
('750e8400-e29b-41d4-a716-446655440006', 'Rooftop panoramic view', 'Rooftop Cam');
|
||||
|
||||
-- Insert test sightings
|
||||
INSERT INTO sightings (user_uuid, sighted_at, camera_id) VALUES
|
||||
('550e8400-e29b-41d4-a716-446655440001', '2025-08-01 09:15:30', '750e8400-e29b-41d4-a716-446655440001'),
|
||||
('550e8400-e29b-41d4-a716-446655440001', '2025-08-01 14:22:45', '750e8400-e29b-41d4-a716-446655440002'),
|
||||
('550e8400-e29b-41d4-a716-446655440002', '2025-08-01 11:08:12', '750e8400-e29b-41d4-a716-446655440003'),
|
||||
('550e8400-e29b-41d4-a716-446655440002', '2025-08-01 16:45:33', '750e8400-e29b-41d4-a716-446655440004'),
|
||||
('550e8400-e29b-41d4-a716-446655440003', '2025-08-02 08:30:00', '750e8400-e29b-41d4-a716-446655440001'),
|
||||
('550e8400-e29b-41d4-a716-446655440003', '2025-08-02 12:15:18', '750e8400-e29b-41d4-a716-446655440005'),
|
||||
('550e8400-e29b-41d4-a716-446655440004', '2025-08-02 07:45:22', '750e8400-e29b-41d4-a716-446655440006'),
|
||||
('550e8400-e29b-41d4-a716-446655440004', '2025-08-02 13:20:15', '750e8400-e29b-41d4-a716-446655440002'),
|
||||
('550e8400-e29b-41d4-a716-446655440005', '2025-08-02 10:55:40', '750e8400-e29b-41d4-a716-446655440003'),
|
||||
('550e8400-e29b-41d4-a716-446655440005', '2025-08-02 15:30:25', '750e8400-e29b-41d4-a716-446655440004');
|
||||
|
@@ -3,4 +3,5 @@
|
||||
rm -f db.sqlite
|
||||
touch db.sqlite
|
||||
sqlite3 db.sqlite < migration.sql
|
||||
sqlite3 db.sqlite < seeds_test.sql
|
||||
|
||||
|
Reference in New Issue
Block a user