2023-10-17 10:35:38 -04:00
|
|
|
#!/usr/bin/env bash
|
2020-02-15 23:23:09 -05:00
|
|
|
|
|
|
|
# Generate the database migration files
|
|
|
|
|
2024-01-10 16:13:31 -05:00
|
|
|
set -o xtrace
|
|
|
|
|
2020-02-15 23:23:09 -05:00
|
|
|
VERSION="$( head -1 debian/changelog | awk -F'[()-]' '{ print $2 }' )"
|
|
|
|
|
2024-01-10 16:13:31 -05:00
|
|
|
sudo ip addr add 10.0.1.250/32 dev lo
|
|
|
|
|
2021-11-06 03:16:02 -04:00
|
|
|
pushd $( git rev-parse --show-toplevel ) &>/dev/null
|
|
|
|
pushd api-daemon &>/dev/null
|
2023-12-09 22:51:08 -05:00
|
|
|
export PVC_CONFIG_FILE="../pvc.sample.conf"
|
2024-01-10 16:13:31 -05:00
|
|
|
export FLASK_APP=./pvcapid-manage_flask.py
|
|
|
|
flask db migrate -m "PVC version ${VERSION}"
|
|
|
|
flask db upgrade
|
2021-11-06 03:16:02 -04:00
|
|
|
popd &>/dev/null
|
|
|
|
popd &>/dev/null
|
2024-01-10 16:13:31 -05:00
|
|
|
|
|
|
|
sudo ip addr del 10.0.1.250/32 dev lo
|