Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce number of INSERT statements #394

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 44 additions & 42 deletions db/sql/deploy/buildings/default_values.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,49 +3,51 @@
BEGIN;

-- lifecycle_stage
INSERT INTO buildings.lifecycle_stage (value) VALUES ('Current');
INSERT INTO buildings.lifecycle_stage (value) VALUES ('Disused');
INSERT INTO buildings.lifecycle_stage (value) VALUES ('Replaced');
INSERT INTO buildings.lifecycle_stage (value) VALUES ('Under Construction');
INSERT INTO buildings.lifecycle_stage (value) VALUES ('Unknown');
INSERT INTO buildings.lifecycle_stage (value) VALUES
('Current'),
('Disused'),
('Replaced'),
('Under Construction'),
('Unknown');

-- use
INSERT INTO buildings.use (value) VALUES ('Abattoir');
INSERT INTO buildings.use (value) VALUES ('Camp');
INSERT INTO buildings.use (value) VALUES ('Cement Works');
INSERT INTO buildings.use (value) VALUES ('Church');
INSERT INTO buildings.use (value) VALUES ('Energy Facility');
INSERT INTO buildings.use (value) VALUES ('Factory');
INSERT INTO buildings.use (value) VALUES ('Fertilizer Works');
INSERT INTO buildings.use (value) VALUES ('Fire Lookout');
INSERT INTO buildings.use (value) VALUES ('Forest Headquarters');
INSERT INTO buildings.use (value) VALUES ('Gas Compound');
INSERT INTO buildings.use (value) VALUES ('Greenhouse');
INSERT INTO buildings.use (value) VALUES ('Gun Club');
INSERT INTO buildings.use (value) VALUES ('Gun Emplacement');
INSERT INTO buildings.use (value) VALUES ('Hall');
INSERT INTO buildings.use (value) VALUES ('Homestead');
INSERT INTO buildings.use (value) VALUES ('Hospital');
INSERT INTO buildings.use (value) VALUES ('Hut');
INSERT INTO buildings.use (value) VALUES ('Lodge');
INSERT INTO buildings.use (value) VALUES ('Marae');
INSERT INTO buildings.use (value) VALUES ('Methanol Plant');
INSERT INTO buildings.use (value) VALUES ('Mill');
INSERT INTO buildings.use (value) VALUES ('Natural Gas Plant');
INSERT INTO buildings.use (value) VALUES ('Observatory');
INSERT INTO buildings.use (value) VALUES ('Power Generation');
INSERT INTO buildings.use (value) VALUES ('Prison');
INSERT INTO buildings.use (value) VALUES ('Salt Works');
INSERT INTO buildings.use (value) VALUES ('School');
INSERT INTO buildings.use (value) VALUES ('Shelter');
INSERT INTO buildings.use (value) VALUES ('Shingle Works');
INSERT INTO buildings.use (value) VALUES ('Silo');
INSERT INTO buildings.use (value) VALUES ('Stamping Battery');
INSERT INTO buildings.use (value) VALUES ('Substation');
INSERT INTO buildings.use (value) VALUES ('Surf Club');
INSERT INTO buildings.use (value) VALUES ('Synthetic Fuel Plant');
INSERT INTO buildings.use (value) VALUES ('University');
INSERT INTO buildings.use (value) VALUES ('Visitor Centre');
INSERT INTO buildings.use (value) VALUES ('Water Treatment Plant');
INSERT INTO buildings.use (value) VALUES
('Abattoir'),
('Camp'),
('Cement Works'),
('Church'),
('Energy Facility'),
('Factory'),
('Fertilizer Works'),
('Fire Lookout'),
('Forest Headquarters'),
('Gas Compound'),
('Greenhouse'),
('Gun Club'),
('Gun Emplacement'),
('Hall'),
('Homestead'),
('Hospital'),
('Hut'),
('Lodge'),
('Marae'),
('Methanol Plant'),
('Mill'),
('Natural Gas Plant'),
('Observatory'),
('Power Generation'),
('Prison'),
('Salt Works'),
('School'),
('Shelter'),
('Shingle Works'),
('Silo'),
('Stamping Battery'),
('Substation'),
('Surf Club'),
('Synthetic Fuel Plant'),
('University'),
('Visitor Centre'),
('Water Treatment Plant');

COMMIT;
Loading