Skip to content

Commit

Permalink
feat(database): update seed script to include sensors and sensor hist…
Browse files Browse the repository at this point in the history
…ory (#83)

Enhance the database seed script by adding entries for sensors and their
history.
  • Loading branch information
0x1026 authored Nov 19, 2024
2 parents 792e7a3 + 3f71785 commit 185798d
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions docker/database/start-scripts/1-seed.sql
Original file line number Diff line number Diff line change
Expand Up @@ -49,28 +49,29 @@ INSERT INTO incidences (name, element_id, description) VALUES
('Árbol enfermo', 1, 'Árbol con signos de enfermedad'),
('Banco pintado', 2, 'Banco pintado con grafitis'),
('Fuente con fuga', 3, 'Fuente con fuga de agua');
--TODO: tasks, routes and works
--* Work orders, tasks and reports
INSERT INTO work_orders (contract_id) VALUES
(1),
(2),
(3);

INSERT INTO tasks (work_order_id, notes) VALUES
(1, 'Poda de mantenimiento en árbol tipo A, caduco, de p.c. entre 41/80 cm.'),
(2, 'Poda de mantenimiento en árbol tipo B, caduco, de p.c. entre 50/100 cm.'),
(3, 'Poda de mantenimiento en árbol tipo C, caduco, de p.c. entre 60/120 cm.');

INSERT INTO tasks_zones (task_id, zone_id) VALUES
(1, 1),
(2, 2),
(3, 3);

INSERT INTO tasks_tasktypes (task_id, tasktype_id) VALUES
(1, 1),
(2, 2),
(3, 3);

INSERT INTO tasks_workers (task_id, worker_id) VALUES
(1, 1),
(2, 2),
(3, 3);
--* Sensors and sensor history
INSERT INTO sensors (zone_id, model, is_active) VALUES
(1, 'Sensor 1', 1),
(2, 'Sensor 2', 1),
(3, 'Sensor 3', 1);

0 comments on commit 185798d

Please sign in to comment.