mirror of
https://github.com/pi-hole/pi-hole
synced 2025-01-03 04:30:55 +00:00
Wrap upgrade script commands in a transaction.
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
parent
b1838512b2
commit
cc40c18f49
@ -1,3 +1,7 @@
|
|||||||
|
.timeout 30000
|
||||||
|
|
||||||
|
BEGIN TRANSACTION;
|
||||||
|
|
||||||
CREATE TABLE domain_audit
|
CREATE TABLE domain_audit
|
||||||
(
|
(
|
||||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||||
@ -6,3 +10,5 @@ CREATE TABLE domain_audit
|
|||||||
);
|
);
|
||||||
|
|
||||||
UPDATE info SET value = 2 WHERE property = 'version';
|
UPDATE info SET value = 2 WHERE property = 'version';
|
||||||
|
|
||||||
|
COMMIT;
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
PRAGMA FOREIGN_KEYS=OFF;
|
PRAGMA FOREIGN_KEYS=OFF;
|
||||||
|
|
||||||
|
BEGIN TRANSACTION;
|
||||||
|
|
||||||
ALTER TABLE regex RENAME TO regex_blacklist;
|
ALTER TABLE regex RENAME TO regex_blacklist;
|
||||||
|
|
||||||
CREATE TABLE regex_blacklist_by_group
|
CREATE TABLE regex_blacklist_by_group
|
||||||
@ -59,3 +61,5 @@ CREATE TRIGGER tr_regex_whitelist_update AFTER UPDATE ON regex_whitelist
|
|||||||
|
|
||||||
|
|
||||||
UPDATE info SET value = 3 WHERE property = 'version';
|
UPDATE info SET value = 3 WHERE property = 'version';
|
||||||
|
|
||||||
|
COMMIT;
|
||||||
|
Loading…
Reference in New Issue
Block a user