Skip to content

Commit

Permalink
fix: syntax error
Browse files Browse the repository at this point in the history
  • Loading branch information
24Victor committed Dec 3, 2024
1 parent ca6f501 commit 504f572
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
4 changes: 1 addition & 3 deletions database/start-scripts/0-init.sql
Original file line number Diff line number Diff line change
Expand Up @@ -147,16 +147,14 @@ create table elements (
zone_id int not null,
point_id int unique,
tree_type_id int null,
incidence_id int NULL,
created_at timestamp default current_timestamp,
updated_at timestamp,
deleted_at timestamp,
foreign key (contract_id) references contracts(id),
foreign key (zone_id) references zones(id),
foreign key (point_id) references points(id),
foreign key (tree_type_id) references tree_types(id),
foreign key (element_type_id) references element_types(id),
forgein key (incidence_id) references incidences(id)
foreign key (element_type_id) references element_types(id)
);

create table incidences (
Expand Down
8 changes: 4 additions & 4 deletions database/start-scripts/1-seed.sql
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ INSERT INTO route_points (route_id, point_id, point_order) VALUES
(2, 3, 2);

--* Elements
INSERT INTO elements (element_type_id, contract_id, zone_id, point_id, tree_type_id, incidence_id) VALUES
(1, 1, 1, 1, 1, NULL),
(2, 2, 2, 2, NULL, NULL),
(3, 3, 3, 3, NULL), NULL;
INSERT INTO elements (element_type_id, contract_id, zone_id, point_id, tree_type_id) VALUES
(1, 1, 1, 1, 1),
(2, 2, 2, 2, NULL),
(3, 3, 3, 3, NULL);

--* Incidences
INSERT INTO incidences (element_id, name, description, photo_id) VALUES
Expand Down

0 comments on commit 504f572

Please sign in to comment.