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>
pull/2611/head
DL6ER 5 years ago
parent 540c57f755
commit 6c1e3a17f7
No known key found for this signature in database
GPG Key ID: 00135ACBD90B28DD

@ -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)),

Loading…
Cancel
Save