mirror of
https://github.com/pi-hole/pi-hole
synced 2024-11-19 06:38:17 +00:00
Reinstall trigger that prevents group zero from being deleted.
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
parent
e589e665a7
commit
eda7f40fef
@ -21,6 +21,11 @@ CREATE TRIGGER tr_group_update AFTER UPDATE ON "group"
|
||||
UPDATE "group" SET date_modified = (cast(strftime('%s', 'now') as int)) WHERE id = NEW.id;
|
||||
END;
|
||||
|
||||
CREATE TRIGGER tr_group_zero AFTER DELETE ON "group"
|
||||
BEGIN
|
||||
INSERT OR IGNORE INTO "group" (id,enabled,name) VALUES (0,1,'Unassociated');
|
||||
END;
|
||||
|
||||
INSERT OR IGNORE INTO "group" (id,enabled,name,description) SELECT id,enabled,name,description FROM "group__";
|
||||
|
||||
DROP TABLE "group__";
|
||||
|
Loading…
Reference in New Issue
Block a user