1
0
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:
DL6ER 2019-08-22 13:54:46 +02:00
parent b1838512b2
commit cc40c18f49
No known key found for this signature in database
GPG Key ID: FB60471F0575164A
2 changed files with 10 additions and 0 deletions

View File

@ -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;

View File

@ -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;