From 26f06e707620a5d366bba82627881feb882f0650 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Fri, 9 Jul 2021 18:30:28 +0000 Subject: [PATCH] importer: Do not try to initialise a column that cannot be NULL with NULL Signed-off-by: Michael Tremer --- src/python/location-importer.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/python/location-importer.in b/src/python/location-importer.in index ff90d91..d4b0ca2 100644 --- a/src/python/location-importer.in +++ b/src/python/location-importer.in @@ -157,7 +157,7 @@ class CLI(object): -- autnums CREATE TABLE IF NOT EXISTS autnums(number bigint, name text NOT NULL); - ALTER TABLE autnums ADD COLUMN IF NOT EXISTS source text NOT NULL; + ALTER TABLE autnums ADD COLUMN IF NOT EXISTS source text; CREATE UNIQUE INDEX IF NOT EXISTS autnums_number ON autnums(number); -- countries @@ -168,7 +168,7 @@ class CLI(object): -- networks CREATE TABLE IF NOT EXISTS networks(network inet, country text); ALTER TABLE networks ADD COLUMN IF NOT EXISTS original_countries text[]; - ALTER TABLE networks ADD COLUMN IF NOT EXISTS source text NOT NULL; + 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 GIST(network inet_ops); -- 2.39.2