From f8e329ce7795c47224c2f7dfbf8615e6d1a8fee6 Mon Sep 17 00:00:00 2001 From: Tom Russell Date: Thu, 27 Sep 2018 21:38:37 +0100 Subject: [PATCH] Add index-dropping migrations --- migrations/002.index-geometries.down.sql | 10 ++++++++++ migrations/003.index-buildings.down.sql | 4 ++++ 2 files changed, 14 insertions(+) create mode 100644 migrations/002.index-geometries.down.sql create mode 100644 migrations/003.index-buildings.down.sql diff --git a/migrations/002.index-geometries.down.sql b/migrations/002.index-geometries.down.sql new file mode 100644 index 00000000..6e5ff132 --- /dev/null +++ b/migrations/002.index-geometries.down.sql @@ -0,0 +1,10 @@ +-- Drop geometric indexes + +-- Spatial index over geometries +DROP INDEX IF EXISTS geometries_idx; + +-- Source ID index over geometries +DROP INDEX IF EXISTS geometries_source_idx; + +-- Index over building geometry_id (expect to look up building by geometry_id for map tiles) +DROP INDEX IF EXISTS building_geometry_idx; diff --git a/migrations/003.index-buildings.down.sql b/migrations/003.index-buildings.down.sql new file mode 100644 index 00000000..75d0e616 --- /dev/null +++ b/migrations/003.index-buildings.down.sql @@ -0,0 +1,4 @@ +-- Drop building indexes + +-- UPRN index over buildings +DROP INDEX IF EXISTS building_uprn_idx;