pvc/gen-api-migrations

14 lines
399 B
Plaintext
Raw Permalink Normal View History

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
VERSION="$( head -1 debian/changelog | awk -F'[()-]' '{ print $2 }' )"
pushd $( git rev-parse --show-toplevel ) &>/dev/null
pushd api-daemon &>/dev/null
export PVC_CONFIG_FILE="./pvcapid.sample.yaml"
2023-11-16 23:12:53 -05:00
./pvcapid-manage_flask.py db migrate -m "PVC version ${VERSION}"
./pvcapid-manage_flask.py db upgrade
popd &>/dev/null
popd &>/dev/null