add new db migration

This commit is contained in:
Ed Chalstrey 2022-04-29 14:05:36 +01:00
parent be0c149133
commit a97d217022
2 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,5 @@
ALTER TABLE buildings DROP COLUMN IF EXISTS current_landuse_source;
ALTER TABLE buildings DROP COLUMN IF EXISTS current_landuse_source_detail;
ALTER TABLE buildings DROP COLUMN IF EXISTS current_landuse_link;

View File

@ -0,0 +1,7 @@
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS current_landuse_source varchar;
ALTER TABLE buildings ADD CONSTRAINT buildings_current_landuse_source_len CHECK (length(current_landuse_source) < 150);
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS current_landuse_source_detail varchar;
ALTER TABLE buildings ADD CONSTRAINT current_landuse_source_detail_len CHECK (length(current_landuse_source_detail) < 500);
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS current_landuse_link text[];