safe-migrate 0.9.0

Check PostgreSQL migrations against a synchronized database baseline
Documentation
#!/bin/sh
set -eu

repository_root=$(CDPATH='' cd -- "$(dirname "$0")/.." && pwd)
cd "$repository_root"

if [ "$#" -gt 0 ]; then
    if [ "$#" -eq 1 ] && { [ "$1" = --help ] || [ "$1" = -h ]; }; then
        printf '%s\n' "Usage: scripts/live-auto-sync" "Requires disposable local PostgreSQL databases; see CONTRIBUTING.md."
        exit 0
    fi
    printf '%s\n' "Unexpected arguments; use --help for usage." >&2
    exit 2
fi

if [ -z "${DATABASE_URL:-}" ]; then
    printf '%s\n' "DATABASE_URL is required for the live auto-sync contract." >&2
    exit 2
fi

cargo test --locked --lib \
    internal_tests::live_auto_sync::live_auto_sync_refreshes_lint_and_lint_chain \
    -- --exact --ignored --nocapture