Commit 26f06e70 authored by Michael Tremer's avatar Michael Tremer

importer: Do not try to initialise a column that cannot be NULL with NULL

Signed-off-by: default avatarMichael Tremer <michael.tremer@ipfire.org>
parent 582a9102
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment