colouring-montreal/migrations/033.redesign_protection_designation.down.sql
Mateusz Konieczny 20f99e9103 Redesign interface listing protection
Per @polly64 checkbox fields were removed and switch was made to using links as both as input method and for providing source.

It is no longer possible to just claim that something is listed/featured, entering data will now be also faster
2022-09-24 12:57:17 +02:00

27 lines
1.4 KiB
SQL

--into a single link from array of links
ALTER TABLE buildings DROP COLUMN IF EXISTS planning_nhle_link;
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_nhle_link text[];
--changed into URL
ALTER TABLE buildings DROP COLUMN IF EXISTS planning_in_apa_url;
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_in_apa boolean DEFAULT FALSE;
ALTER TABLE buildings DROP COLUMN IF EXISTS planning_world_list_url;
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_world_list_id int DEFAULT NULL;
ALTER TABLE buildings DROP COLUMN IF EXISTS planning_heritage_at_risk_url;
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_heritage_at_risk_id int DEFAULT NULL;
ALTER TABLE buildings DROP COLUMN IF EXISTS planning_in_conservation_area_url;
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_in_conservation_area boolean DEFAULT FALSE;
-- URL column exists already
ALTER TABLE ADD COLUMN IF NOT EXISTS planning_list_id int DEFAULT NULL;
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_in_glher boolean DEFAULT FALSE;
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_apa_name VARCHAR DEFAULT '';
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_apa_tier smallint DEFAULT NULL;
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_in_local_list boolean DEFAULT FALSE;
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_in_historic_area_assessment boolean DEFAULT FALSE;