#! /bin/bash

# FOR USE WITH DOCKER DEVELOPMENT ENVIRONMENT ONLY.

# failfast
set -e
set -o pipefail

ARG="${$1:-docker}"

if [[ $# -eq 0 ]] ; then
    echo 'ERROR: run-migrations requires an argument for CAPO_PROFILE'
    exit 0
fi

# Python library installation
pip install -r requirements.txt

env CAPO_PROFILE=$ARG alembic upgrade head
