2022-04-29 09:05:36 -04:00
|
|
|
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);
|
|
|
|
|
2022-05-05 07:00:08 -04:00
|
|
|
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS current_landuse_link text[];
|
|
|
|
|
2022-05-05 10:40:58 -04:00
|
|
|
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
|
2022-05-05 10:45:20 -04:00
|
|
|
WHERE b.building_id = v.building_id
|
|
|
|
AND v.attribute = 'current_landuse_group';
|