diff --git a/.gitignore b/.gitignore index 50a3998..921f09c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /target .history -/frontend/node_modules/* \ No newline at end of file +/frontend/node_modules/* +db.sqlite diff --git a/db.sqlite b/db.sqlite deleted file mode 100644 index 301227e..0000000 Binary files a/db.sqlite and /dev/null differ diff --git a/seeds_test.sql b/seeds_test.sql new file mode 100644 index 0000000..2f881f9 --- /dev/null +++ b/seeds_test.sql @@ -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'); + diff --git a/test_db.sh b/test_db.sh index 4237272..ec3ecc8 100755 --- a/test_db.sh +++ b/test_db.sh @@ -3,4 +3,5 @@ rm -f db.sqlite touch db.sqlite sqlite3 db.sqlite < migration.sql +sqlite3 db.sqlite < seeds_test.sql