mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-04-21 23:00:18 +00:00
Add update to gravity database version 12, renaming the Unassociated group to Default group.
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
parent
78469ee58d
commit
7cc35d3b04
3 changed files with 28 additions and 3 deletions
19
advanced/Scripts/database_migration/gravity/11_to_12.sql
Normal file
19
advanced/Scripts/database_migration/gravity/11_to_12.sql
Normal file
|
@ -0,0 +1,19 @@
|
|||
.timeout 30000
|
||||
|
||||
PRAGMA FOREIGN_KEYS=OFF;
|
||||
|
||||
BEGIN TRANSACTION;
|
||||
|
||||
UPDATE "group" SET name = 'Default' WHERE id = 0;
|
||||
UPDATE "group" SET description = 'The default group' WHERE id = 0;
|
||||
|
||||
DROP TRIGGER IF EXISTS tr_group_zero;
|
||||
|
||||
CREATE TRIGGER tr_group_zero AFTER DELETE ON "group"
|
||||
BEGIN
|
||||
INSERT OR IGNORE INTO "group" (id,enabled,name,description) VALUES (0,1,'Default','The default group');
|
||||
END;
|
||||
|
||||
UPDATE info SET value = 12 WHERE property = 'version';
|
||||
|
||||
COMMIT;
|
Loading…
Add table
Add a link
Reference in a new issue