22 lines
407 B
Bash
Executable File
22 lines
407 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# run migrations
|
|
export FLASK_APP=./crc/__init__.py
|
|
|
|
if [ "$DOWNGRADE_DB" = "true" ]; then
|
|
echo 'Downgrading database...'
|
|
pipenv run flask db downgrade
|
|
fi
|
|
|
|
if [ "$UPGRADE_DB" = "true" ]; then
|
|
echo 'Upgrading database...'
|
|
pipenv run flask db upgrade
|
|
fi
|
|
|
|
if [ "$RESET_DB" = "true" ]; then
|
|
echo 'Resetting database...'
|
|
pipenv run flask load-example-data
|
|
fi
|
|
|
|
pipenv run python ./run.py
|