diff --git a/migrations/007.date-details.down.sql b/migrations/007.date-details.down.sql new file mode 100644 index 00000000..3edaec9d --- /dev/null +++ b/migrations/007.date-details.down.sql @@ -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; diff --git a/migrations/007.date-details.up.sql b/migrations/007.date-details.up.sql new file mode 100644 index 00000000..3d2c698f --- /dev/null +++ b/migrations/007.date-details.up.sql @@ -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[];