From: Michael Tremer Date: Mon, 18 Mar 2024 17:05:36 +0000 (+0000) Subject: importer: Drop any indexes we no longer need X-Git-Url: http://git.ipfire.org/?p=people%2Fms%2Flibloc.git;a=commitdiff_plain;h=e075b72367f4f40be38960e500aad6a26a488591 importer: Drop any indexes we no longer need Signed-off-by: Michael Tremer --- diff --git a/src/scripts/location-importer.in b/src/scripts/location-importer.in index 80290ff..572f42e 100644 --- a/src/scripts/location-importer.in +++ b/src/scripts/location-importer.in @@ -197,7 +197,6 @@ class CLI(object): first_seen_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP, last_seen_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP); CREATE UNIQUE INDEX IF NOT EXISTS announcements_networks ON announcements(network); - CREATE INDEX IF NOT EXISTS announcements_family ON announcements(family(network)); CREATE INDEX IF NOT EXISTS announcements_search ON announcements USING SPGIST(network inet_ops); -- autnums @@ -215,7 +214,6 @@ class CLI(object): ALTER TABLE networks ADD COLUMN IF NOT EXISTS original_countries text[]; ALTER TABLE networks ADD COLUMN IF NOT EXISTS source text; CREATE UNIQUE INDEX IF NOT EXISTS networks_network ON networks(network); - CREATE INDEX IF NOT EXISTS networks_family ON networks USING BTREE(family(network)); CREATE INDEX IF NOT EXISTS networks_search ON networks USING SPGIST(network inet_ops); -- geofeeds @@ -305,7 +303,10 @@ class CLI(object): ALTER TABLE network_overrides ADD COLUMN IF NOT EXISTS is_drop boolean; ALTER TABLE network_overrides DROP COLUMN IF EXISTS source; + -- Cleanup things we no longer need DROP TABLE IF EXISTS geofeed_overrides; + DROP INDEX IF EXISTS announcements_family; + DROP INDEX IF EXISTS networks_family; """) return db