2020-02-07 02:08:49 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2020-02-05 22:07:34 +00:00
|
|
|
# run migrations
|
2020-02-06 14:45:24 +00:00
|
|
|
export FLASK_APP=./crc/__init__.py
|
2020-04-15 18:43:09 +00:00
|
|
|
|
|
|
|
for entry in ./instance/* ; do
|
|
|
|
echo "$entry"
|
2020-04-15 19:59:27 +00:00
|
|
|
cat $entry
|
2020-04-15 18:43:09 +00:00
|
|
|
done
|
|
|
|
|
2020-04-21 23:37:56 +00:00
|
|
|
if [ "$DOWNGRADE_DB" = "true" ]; then
|
|
|
|
echo 'Downgrading...'
|
|
|
|
pipenv run flask db downgrade
|
|
|
|
fi
|
|
|
|
|
2020-02-06 14:45:37 +00:00
|
|
|
pipenv run flask db upgrade
|
2020-02-07 02:08:49 +00:00
|
|
|
|
|
|
|
if [ "$RESET_DB" = "true" ]; then
|
|
|
|
echo 'Resetting database...'
|
|
|
|
pipenv run flask load-example-data
|
|
|
|
fi
|
|
|
|
|
2020-02-05 22:07:34 +00:00
|
|
|
pipenv run python ./run.py
|