colouring-montreal/migrations/025.actual.sql
Mateusz Konieczny fe94a51da4 Modify already commited migration
this avoids confusing migration in repository that could damage data, as meaning of the data in database mismatched decription
2022-02-14 13:36:19 +01:00

34 lines
1.1 KiB
SQL

INSERT INTO reference_tables.landuse_classifications
(landuse_id, description, level, parent_id, is_used)
VALUES
('U15X','Unclassified, presumed non-residential','order',NULL,True);
INSERT INTO reference_tables.buildings_landuse_order
(landuse_id, description)
VALUES
('U15X','Unclassified, presumed non-residential');
INSERT INTO reference_tables.landuse_classifications
(landuse_id, description, level, parent_id, is_used)
VALUES
('U073X','Unclassified, presumed non-residential','group','U15X',True);
INSERT INTO reference_tables.buildings_landuse_group
(landuse_id, description, parent_order_id)
VALUES
('U073X','Unclassified, presumed non-residential', 'U15X');
UPDATE buildings
SET current_landuse_order = 'Unclassified, presumed non-residential'
WHERE current_landuse_order = 'Unclassified buildings';
DELETE FROM reference_tables.landuse_classifications
WHERE landuse_id='U14X';
DELETE FROM reference_tables.buildings_landuse_order
WHERE landuse_id='U14X';
DELETE FROM reference_tables.landuse_classifications
WHERE landuse_id='U072X';
DELETE FROM reference_tables.buildings_landuse_group
WHERE landuse_id='U072X';