mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-04-22 15:20:14 +00:00
Add antigravity support to gravity
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
parent
aec852fa51
commit
00cbb8bc8a
4 changed files with 53 additions and 9 deletions
|
@ -134,4 +134,11 @@ upgrade_gravityDB(){
|
|||
pihole-FTL sqlite3 "${database}" < "${scriptPath}/15_to_16.sql"
|
||||
version=16
|
||||
fi
|
||||
if [[ "$version" == "16" ]]; then
|
||||
# Add antigravity table
|
||||
# Add column type to adlist table (to support adlist types)
|
||||
echo -e " ${INFO} Upgrading gravity database from version 16 to 17"
|
||||
pihole-FTL sqlite3 "${database}" < "${scriptPath}/16_to_17.sql"
|
||||
version=17
|
||||
fi
|
||||
}
|
||||
|
|
13
advanced/Scripts/database_migration/gravity/16_to_17.sql
Normal file
13
advanced/Scripts/database_migration/gravity/16_to_17.sql
Normal file
|
@ -0,0 +1,13 @@
|
|||
.timeout 30000
|
||||
|
||||
PRAGMA FOREIGN_KEYS=OFF;
|
||||
|
||||
BEGIN TRANSACTION;
|
||||
|
||||
ALTER TABLE adlist ADD COLUMN type INTEGER NOT NULL DEFAULT 0;
|
||||
|
||||
UPDATE adlist SET type = 0;
|
||||
|
||||
UPDATE info SET value = 17 WHERE property = 'version';
|
||||
|
||||
COMMIT;
|
Loading…
Add table
Add a link
Reference in a new issue