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-cache-encryption" "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 cache-encryption contract." >&2
    exit 2
fi

cargo test --locked --lib \
    internal_tests::live_cache_encryption::live_encrypted_cache_round_trip_and_rejection_contract \
    -- --exact --ignored --nocapture