fix mark ddemolitions script psql

This commit is contained in:
Ed Chalstrey 2022-04-14 13:37:15 +01:00
parent 880e8d6424
commit ca75e8004f

View File

@ -18,8 +18,6 @@ psql -c "INSERT INTO old_geometries ( source_id, geometry_geom )
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 AS b
SET latest_demolish_date = CURRENT_DATE SET b.latest_demolish_date = CURRENT_DATE
WHERE b.source_id = g.source_id FROM old_geometries AS og
AND source_id IN (SELECT source_id WHERE b.ref_toid = og.source_id;"
FROM old_geometries AS g
);"