Remove NOT NULL constraint on list ids as this is implied by PRIMARY KEY (even though most, if not all, examples on the web still use both attributes at the same time)

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER 2019-05-01 17:54:29 +02:00
parent 540c57f755
commit 6c1e3a17f7
No known key found for this signature in database
GPG key ID: 00135ACBD90B28DD

View file

@ -1,22 +1,22 @@
CREATE TABLE whitelist (id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
CREATE TABLE whitelist (id INTEGER PRIMARY KEY AUTOINCREMENT,
domain TEXT UNIQUE NOT NULL,
enabled BOOLEAN NOT NULL DEFAULT 1,
date_added INTEGER NOT NULL DEFAULT (cast(strftime('%s', 'now') as int)),
date_modified INTEGER NOT NULL DEFAULT (cast(strftime('%s', 'now') as int)),
comment TEXT);
CREATE TABLE blacklist (id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
CREATE TABLE blacklist (id INTEGER PRIMARY KEY AUTOINCREMENT,
domain TEXT UNIQUE NOT NULL,
enabled BOOLEAN NOT NULL DEFAULT 1,
date_added INTEGER NOT NULL DEFAULT (cast(strftime('%s', 'now') as int)),
date_modified INTEGER NOT NULL DEFAULT (cast(strftime('%s', 'now') as int)),
comment TEXT);
CREATE TABLE regex (id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
CREATE TABLE regex (id INTEGER PRIMARY KEY AUTOINCREMENT,
domain TEXT UNIQUE NOT NULL,
enabled BOOLEAN NOT NULL DEFAULT 1,
date_added INTEGER NOT NULL DEFAULT (cast(strftime('%s', 'now') as int)),
date_modified INTEGER NOT NULL DEFAULT (cast(strftime('%s', 'now') as int)),
comment TEXT);
CREATE TABLE adlists (id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
CREATE TABLE adlists (id INTEGER PRIMARY KEY AUTOINCREMENT,
address TEXT UNIQUE NOT NULL,
enabled BOOLEAN NOT NULL DEFAULT 1,
date_added INTEGER NOT NULL DEFAULT (cast(strftime('%s', 'now') as int)),