From 97d47d54acefe5acf2c22e33acaad7f7f15121b8 Mon Sep 17 00:00:00 2001 From: Dominic H Date: Fri, 27 Sep 2019 14:47:16 +0100 Subject: [PATCH] Readies #363 for launch --- migrations/014.type-extension-1.up.sql | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 migrations/014.type-extension-1.up.sql diff --git a/migrations/014.type-extension-1.up.sql b/migrations/014.type-extension-1.up.sql new file mode 100644 index 00000000..6326efdb --- /dev/null +++ b/migrations/014.type-extension-1.up.sql @@ -0,0 +1,19 @@ +--Original building use, this is same NLUD fields as current building use +ALTER TABLE buildings + ADD COLUMN IF NOT EXISTS original_building_use; + +-- Building attachment, ENUM: Detached, Semi-detached, End-Terrace, Mid-Terrace +CREATE TYPE building_attachment_form +AS ENUM ('Deatched', + 'Semi-Detached', + 'End-Terrace', + 'Mid-Terrace', + 'Unknown'); + +ALTER TABLE buildings + ADD COLUMN IF NOT EXISTS building_attachment_form building_attachment_form DEFAULT 'Unknown'; + +-- [Disabled for launch] Date of change of use +-- This needs to pair with demolition +ALTER TABLE buildings + ADD COLUMN IF NOT EXISTS date_change_building_use smallint;