#!/bin/bash
SCHEMA=discovery

sudo -u buddy bash <<EOF
    # run migrations and view status 
    export PGPASSFILE=/var/lib/postgresql/.pgpass
    iceman -e $ENVIRONMENT up || { echo 'failed to apply migrations' >&2 ; exit 1; }
    iceman -e $ENVIRONMENT status
EOF
