mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-04-24 00:00:14 +00:00
Add date_updated field in adlist table set when a list changes.
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
parent
17ed5398e6
commit
4fd412d7c3
4 changed files with 33 additions and 2 deletions
|
@ -110,4 +110,10 @@ upgrade_gravityDB(){
|
|||
sqlite3 "${database}" < "${scriptPath}/11_to_12.sql"
|
||||
version=12
|
||||
fi
|
||||
if [[ "$version" == "12" ]]; then
|
||||
# Add column date_updated to alist table
|
||||
echo -e " ${INFO} Upgrading gravity database from version 12 to 13"
|
||||
sqlite3 "${database}" < "${scriptPath}/12_to_13.sql"
|
||||
version=12
|
||||
fi
|
||||
}
|
||||
|
|
11
advanced/Scripts/database_migration/gravity/12_to_13.sql
Normal file
11
advanced/Scripts/database_migration/gravity/12_to_13.sql
Normal file
|
@ -0,0 +1,11 @@
|
|||
.timeout 30000
|
||||
|
||||
PRAGMA FOREIGN_KEYS=OFF;
|
||||
|
||||
BEGIN TRANSACTION;
|
||||
|
||||
ALTER TABLE adlist ADD COLUMN date_updated INTEGER;
|
||||
|
||||
UPDATE info SET value = 13 WHERE property = 'version';
|
||||
|
||||
COMMIT;
|
Loading…
Add table
Add a link
Reference in a new issue