apollo-backend/script/migrate

17 lines
272 B
Text
Raw Normal View History

2021-05-10 00:51:15 +00:00
#!/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
}