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