From 8b761b8ddc10ef3e33072451b26797856d43be11 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Thu, 5 May 2022 15:40:58 +0100 Subject: [PATCH] add current_landuse_verified update to buildings --- migrations/028.landuse-source.up.sql | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/migrations/028.landuse-source.up.sql b/migrations/028.landuse-source.up.sql index 4a295ff0..01b47257 100644 --- a/migrations/028.landuse-source.up.sql +++ b/migrations/028.landuse-source.up.sql @@ -6,4 +6,9 @@ ALTER TABLE buildings ADD CONSTRAINT current_landuse_source_detail_len CHECK (le ALTER TABLE buildings ADD COLUMN IF NOT EXISTS current_landuse_link text[]; -ALTER TABLE buildings ADD COLUMN IF NOT EXISTS current_landuse_verified BOOLEAN NOT NULL DEFAULT FALSE; \ No newline at end of file +ALTER TABLE buildings ADD COLUMN IF NOT EXISTS current_landuse_verified BOOLEAN NOT NULL DEFAULT FALSE; + +UPDATE buildings as b +SET current_landuse_verified = TRUE +FROM building_verification as v +WHERE b.building_id = v.building_id; \ No newline at end of file