apollo-backend/script/migrate
Andre Medeiros 7fad5ac9e4 initial pass
2021-05-09 20:51:15 -04:00

16 lines
272 B
Bash
Executable file

#!/bin/sh
set -e
cd "$(dirname "$0")/.."
# ensure everything in the app is up to date.
script/bootstrap
[ -f ".env" ] && {
source .env
echo "===> Running migrations..."
createdb -U apollo apollo || true
migrate -path=./migrations -database=$DATABASE_URL up
}