#!/bin/sh set -eu : "${PGHOST:=postgres}" : "${PGUSER:=postgres}" : "${PGDATABASE:=error_reporting}" until pg_isready -h "$PGHOST" -U "$PGUSER" -d "$PGDATABASE"; do sleep 1 done _run_sql() { psql -h "$PGHOST" -U "$PGUSER" -d "$PGDATABASE" -v ON_ERROR_STOP=1 -f "$1" } _run_sql "/migrations/20260322043000_create_error_reporting_core.up.sql" _run_sql "/migrations/20260322044000_create_error_occurrences_and_states.up.sql" _run_sql "/migrations/20260322044500_add_ingest_idempotency.up.sql" _run_sql "/migrations/20260322045000_create_collectors_retention_and_audit.up.sql" _run_sql "/seed/dev_two_projects.sql" _run_sql "/seed/dev_collector_http_fixture.sql" echo "docker-migrate: complete"