fix mark demolitions script again

This commit is contained in:
Ed Chalstrey 2022-04-14 13:39:42 +01:00
parent ca75e8004f
commit 8a540256bb

View File

@ -17,7 +17,7 @@ psql -c "INSERT INTO old_geometries ( source_id, geometry_geom )
WHERE g.source_id = r.source_id);" WHERE g.source_id = r.source_id);"
echo "Set each building's latest_demolish_date for today if linked geometry in the db not present in new data..." echo "Set each building's latest_demolish_date for today if linked geometry in the db not present in new data..."
psql -c "UPDATE buildings AS b psql -c "UPDATE buildings
SET b.latest_demolish_date = CURRENT_DATE SET latest_demolish_date = CURRENT_DATE
FROM old_geometries AS og FROM old_geometries AS og
WHERE b.ref_toid = og.source_id;" WHERE buildings.ref_toid = og.source_id;"