Add gravity database 9->10 update script.

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER 2020-01-20 17:59:24 +01:00
parent bf01f725f7
commit 633e56e8a9
No known key found for this signature in database
GPG key ID: FB60471F0575164A
2 changed files with 36 additions and 0 deletions

View file

@ -87,4 +87,11 @@ upgrade_gravityDB(){
sqlite3 "${database}" < "${scriptPath}/8_to_9.sql"
version=9
fi
if [[ "$version" == "9" ]]; then
# This migration drops unused tables and creates triggers to remove
# obsolete groups assignments when the linked items are deleted
echo -e " ${INFO} Upgrading gravity database from version 9 to 10"
sqlite3 "${database}" < "${scriptPath}/9_to_10.sql"
version=10
fi
}