mirror of
https://github.com/pi-hole/pi-hole
synced 2025-01-03 12:40:56 +00:00
710036adae
Signed-off-by: DL6ER <dl6er@dl6er.de>
15 lines
600 B
Plaintext
15 lines
600 B
Plaintext
CREATE TABLE whitelist (domain TEXT UNIQUE NOT NULL, comment TEXT, disabled BOOLEAN DEFAULT 0, DateAdded DATETIME);
|
|
|
|
CREATE TABLE blacklist (domain TEXT UNIQUE NOT NULL, comment TEXT, disabled BOOLEAN DEFAULT 0, DateAdded DATETIME);
|
|
|
|
CREATE TABLE gravity (domain TEXT UNIQUE NOT NULL);
|
|
|
|
CREATE VIEW vw_gravity AS SELECT DISTINCT a.domain
|
|
FROM gravity a
|
|
WHERE a.domain NOT IN (SELECT domain from whitelist WHERE disabled != 1);
|
|
|
|
CREATE VIEW vw_blacklist AS SELECT DISTINCT a.domain
|
|
FROM blacklist a
|
|
WHERE a.disabled != 1 AND
|
|
a.domain NOT IN (SELECT domain from whitelist WHERE disabled != 1);
|