Add timestamps and comment fields to clients. This updates the gravity database to version 11.

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER 2020-01-27 10:36:16 +00:00
parent e0b3405a4d
commit 92aa510bda
No known key found for this signature in database
GPG key ID: 00135ACBD90B28DD
3 changed files with 36 additions and 2 deletions

View file

@ -94,4 +94,14 @@ upgrade_gravityDB(){
sqlite3 "${database}" < "${scriptPath}/9_to_10.sql"
version=10
fi
if [[ "$version" == "10" ]]; then
# This adds timestamp and an optional comment field to the client table
# These fields are only temporary and will be replaces by the columns
# defined in gravity.db.sql during gravity swapping. We add them here
# to keep the copying process generic (needs the same columns in both the
# source and the destination databases).
echo -e " ${INFO} Upgrading gravity database from version 10 to 11"
sqlite3 "${database}" < "${scriptPath}/10_to_11.sql"
version=11
fi
}