Add date details migrations

This commit is contained in:
Tom Russell 2019-01-19 17:46:51 +00:00
parent 9914df7925
commit c30ffda338
2 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,4 @@
-- Remove source details and links
ALTER TABLE buildings DROP COLUMN IF EXISTS date_source_detail;
ALTER TABLE buildings DROP COLUMN IF EXISTS date_link;

View File

@ -0,0 +1,10 @@
--
-- Source details and links
--
-- Create date source details
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS date_source_detail varchar;
ALTER TABLE buildings ADD CONSTRAINT buildings_date_source_detail_len CHECK (length(date_source_detail) < 500);
-- Create list of links
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS date_link text[];