2020-02-15 22:10:34 -05:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Apply PVC database migrations
|
|
|
|
# Part of the Parallel Virtual Cluster (PVC) system
|
|
|
|
|
2023-12-14 14:45:58 -05:00
|
|
|
export PVC_CONFIG_FILE="/etc/pvc/pvc.conf"
|
2020-02-15 22:10:34 -05:00
|
|
|
|
|
|
|
if [[ ! -f ${PVC_CONFIG_FILE} ]]; then
|
|
|
|
echo "Create a configuration file at ${PVC_CONFIG_FILE} before upgrading the database."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
pushd /usr/share/pvc
|
2023-09-01 00:24:47 -04:00
|
|
|
|
2024-01-11 00:05:56 -05:00
|
|
|
export FLASK_APP=./pvcapid-manage-flask.py
|
|
|
|
flask db upgrade
|
2023-09-01 00:24:47 -04:00
|
|
|
|
2020-02-15 22:10:34 -05:00
|
|
|
popd
|