mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-23 21:30:17 +00:00
We cannot create vw_gravity before having created vw_whitelist as the former depends onthe later. This commit changes the order in which the tables are created.
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
parent
ae3b8be4d4
commit
3cb4f6d9d4
1 changed files with 3 additions and 4 deletions
|
@ -89,10 +89,6 @@ CREATE TABLE info
|
|||
|
||||
INSERT INTO info VALUES("version","1");
|
||||
|
||||
CREATE VIEW vw_gravity AS SELECT domain
|
||||
FROM gravity
|
||||
WHERE domain NOT IN (SELECT domain from vw_whitelist);
|
||||
|
||||
CREATE VIEW vw_whitelist AS SELECT DISTINCT domain
|
||||
FROM whitelist
|
||||
LEFT JOIN whitelist_by_group ON whitelist_by_group.whitelist_id = whitelist.id
|
||||
|
@ -141,3 +137,6 @@ CREATE TRIGGER tr_adlist_update AFTER UPDATE ON adlist
|
|||
UPDATE adlist SET date_modified = (cast(strftime('%s', 'now') as int)) WHERE address = NEW.address;
|
||||
END;
|
||||
|
||||
CREATE VIEW vw_gravity AS SELECT domain
|
||||
FROM gravity
|
||||
WHERE domain NOT IN (SELECT domain from vw_whitelist);
|
||||
|
|
Loading…
Reference in a new issue