2019-02-03 12:34:08 +00:00
|
|
|
CREATE TABLE whitelist (domain TEXT UNIQUE NOT NULL, comment TEXT, disabled BOOLEAN DEFAULT 0, DateAdded DATETIME);
|
2019-02-03 12:04:31 +00:00
|
|
|
|
2019-02-03 12:34:08 +00:00
|
|
|
CREATE TABLE blacklist (domain TEXT UNIQUE NOT NULL, comment TEXT, disabled BOOLEAN DEFAULT 0, DateAdded DATETIME);
|
2019-02-03 12:04:31 +00:00
|
|
|
|
|
|
|
CREATE TABLE gravity (domain TEXT UNIQUE NOT NULL);
|
|
|
|
|
|
|
|
CREATE VIEW vw_gravity AS SELECT DISTINCT a.domain
|
|
|
|
FROM gravity a
|
2019-02-03 12:34:08 +00:00
|
|
|
WHERE a.domain NOT IN (SELECT domain from whitelist WHERE disabled != 1);
|
2019-02-03 12:04:31 +00:00
|
|
|
|
|
|
|
CREATE VIEW vw_blacklist AS SELECT DISTINCT a.domain
|
|
|
|
FROM blacklist a
|
2019-02-03 12:34:08 +00:00
|
|
|
WHERE a.disabled != 1 AND
|
|
|
|
a.domain NOT IN (SELECT domain from whitelist WHERE disabled != 1);
|