From ead7c938671c75f0092509d5f43769e94ea9967e Mon Sep 17 00:00:00 2001 From: Mateusz Konieczny Date: Thu, 10 Feb 2022 16:10:55 +0100 Subject: [PATCH] Note that downgrades will fail of such data is present As there is no unknown building type reclassifying is impossible --- migrations/023.garden_buildings.down.sql | 1 + migrations/024.unclassified_buildings.up.sql | 2 ++ 2 files changed, 3 insertions(+) diff --git a/migrations/023.garden_buildings.down.sql b/migrations/023.garden_buildings.down.sql index 8e23b73d..6ffb1ba5 100644 --- a/migrations/023.garden_buildings.down.sql +++ b/migrations/023.garden_buildings.down.sql @@ -1,2 +1,3 @@ +-- note that you need to somehow reclassify such buildings, if present - before downgrading DELETE FROM reference_tables.landuse_classifications WHERE landuse_id = 'U071X'; DELETE FROM reference_tables.buildings_landuse_group WHERE landuse_id = 'U071X'; diff --git a/migrations/024.unclassified_buildings.up.sql b/migrations/024.unclassified_buildings.up.sql index 79882dbc..c25efd3a 100644 --- a/migrations/024.unclassified_buildings.up.sql +++ b/migrations/024.unclassified_buildings.up.sql @@ -1,3 +1,5 @@ +-- note that you need to somehow reclassify such buildings, if present - before downgrading + -- equivalent to 015 migration INSERT INTO reference_tables.landuse_classifications (landuse_id, description, level, parent_id, is_used)