mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-24 13:50:17 +00:00
Change UNIQUEness constraint from (address) to (address, type) in the adlist table. This will allow certain adlists to be associated to different groups. A possible scenario is an adlist meant to block a specific service (e.g. Twitter, Youtube, etc.). It can then either be used to ensure these services are really blocked on the devices of group A but will never be blocked on devices of group B.
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
parent
aca7b31b83
commit
b5ab8ac198
1 changed files with 3 additions and 2 deletions
|
@ -27,7 +27,7 @@ CREATE TABLE domainlist
|
|||
CREATE TABLE adlist
|
||||
(
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
address TEXT UNIQUE NOT NULL,
|
||||
address TEXT 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)),
|
||||
|
@ -37,7 +37,8 @@ CREATE TABLE adlist
|
|||
invalid_domains INTEGER NOT NULL DEFAULT 0,
|
||||
status INTEGER NOT NULL DEFAULT 0,
|
||||
abp_entries INTEGER NOT NULL DEFAULT 0,
|
||||
type INTEGER NOT NULL DEFAULT 0
|
||||
type INTEGER NOT NULL DEFAULT 0,
|
||||
UNIQUE(address, type)
|
||||
);
|
||||
|
||||
CREATE TABLE adlist_by_group
|
||||
|
|
Loading…
Reference in a new issue