mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-04-19 05:40:13 +00:00
Modify DELETE triggers to delete BEFORE instead of AFTER to prevent possible foreign key constraint violations
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
parent
1b87ec067e
commit
d2828310f2
2 changed files with 34 additions and 0 deletions
|
@ -152,4 +152,11 @@ upgrade_gravityDB(){
|
|||
pihole-FTL sqlite3 -ni "${database}" < "${scriptPath}/17_to_18.sql"
|
||||
version=18
|
||||
fi
|
||||
if [[ "$version" == "18" ]]; then
|
||||
# Modify DELETE triggers to delete BEFORE instead of AFTER to prevent
|
||||
# foreign key constraint violations
|
||||
echo -e " ${INFO} Upgrading gravity database from version 18 to 19"
|
||||
pihole-FTL sqlite3 -ni "${database}" < "${scriptPath}/18_to_19.sql"
|
||||
version=19
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue