From 72afa1073da05a0e7ddb22c0acdb0b63190b8284 Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Sun, 25 Aug 2024 21:47:07 +0100 Subject: [PATCH 1/2] Add missing creation of table antigravity in migration script 16 to 17 Signed-off-by: Adam Warner --- advanced/Scripts/database_migration/gravity/16_to_17.sql | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/advanced/Scripts/database_migration/gravity/16_to_17.sql b/advanced/Scripts/database_migration/gravity/16_to_17.sql index 23532e3a..ed2ec7c5 100644 --- a/advanced/Scripts/database_migration/gravity/16_to_17.sql +++ b/advanced/Scripts/database_migration/gravity/16_to_17.sql @@ -8,6 +8,12 @@ ALTER TABLE adlist ADD COLUMN type INTEGER NOT NULL DEFAULT 0; UPDATE adlist SET type = 0; +CREATE TABLE antigravity +( + domain TEXT NOT NULL, + adlist_id INTEGER NOT NULL REFERENCES adlist (id) +); + CREATE VIEW vw_antigravity AS SELECT domain, adlist_by_group.group_id AS group_id FROM antigravity LEFT JOIN adlist_by_group ON adlist_by_group.adlist_id = antigravity.adlist_id From cfbf3f61cda1b89d27db42e96b1a122018607fbd Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Mon, 26 Aug 2024 21:30:12 +0100 Subject: [PATCH 2/2] Update advanced/Scripts/database_migration/gravity/16_to_17.sql Co-authored-by: Dominik Signed-off-by: Adam Warner --- advanced/Scripts/database_migration/gravity/16_to_17.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/advanced/Scripts/database_migration/gravity/16_to_17.sql b/advanced/Scripts/database_migration/gravity/16_to_17.sql index ed2ec7c5..47b631cc 100644 --- a/advanced/Scripts/database_migration/gravity/16_to_17.sql +++ b/advanced/Scripts/database_migration/gravity/16_to_17.sql @@ -8,7 +8,7 @@ ALTER TABLE adlist ADD COLUMN type INTEGER NOT NULL DEFAULT 0; UPDATE adlist SET type = 0; -CREATE TABLE antigravity +CREATE TABLE IF NOT EXISTS antigravity ( domain TEXT NOT NULL, adlist_id INTEGER NOT NULL REFERENCES adlist (id)