From: Michael Tremer Date: Wed, 19 Jun 2024 09:36:26 +0000 (+0000) Subject: importer: Ensure that we set timestamps in the announcements table X-Git-Tag: 0.9.18~48 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fca2624750d1e4ee9f993093ad243154e2257589;p=location%2Flibloc.git importer: Ensure that we set timestamps in the announcements table Otherwise aging out older announcements does not work. Signed-off-by: Michael Tremer --- diff --git a/src/scripts/location-importer.in b/src/scripts/location-importer.in index c65029b..33613b7 100644 --- a/src/scripts/location-importer.in +++ b/src/scripts/location-importer.in @@ -199,6 +199,8 @@ class CLI(object): CREATE UNIQUE INDEX IF NOT EXISTS announcements_networks ON announcements(network); CREATE INDEX IF NOT EXISTS announcements_search2 ON announcements USING SPGIST(network inet_ops); + ALTER TABLE announcements ALTER COLUMN first_seen_at SET NOT NULL; + ALTER TABLE announcements ALTER COLUMN last_seen_at SET NOT NULL; -- autnums CREATE TABLE IF NOT EXISTS autnums(number bigint, name text NOT NULL);