Disposable Postgres replay

Trust the replay.
Not the diff.

Run your migration command against clean, repeated, and partially applied schema states. Catch duplicate objects, destructive DDL, and false assumptions before an environment apply.

  • Disposable containers only
  • Zero telemetry
  • CI-ready JSON
Three translucent database schema planes connected by a cyan replay path, with an amber fracture revealing divergence in the partial state.
Replay field / 03 states

Recorded replay / interactive

See the failure before production does.

This browser demo uses recorded output—your SQL never leaves the page. Use Left and Right arrows on the replay rail.

mrg / replay.log
Ready. Choose a schema state, then run the recorded replay.
Awaiting replay No database connection is made in this demo.

One container / three truths

A behavioral gate, not another schema diff.

  1. 01

    Seed known state

    Your baseline and explicit partial fixture enter two isolated databases inside one disposable Postgres container.

  2. 02

    Run your real command

    The exact migration, ORM, or schema-apply command runs once, twice, and against the partial state with an injected local URL.

  3. 03

    Block on behavior

    Process errors and Postgres DDL become a human report or stable JSON. Unsafe outcomes exit 2 and stop CI.

Open source / v0.1.0

Put reality in the pipeline.

Build the single binary, point it at fixture SQL, and keep your existing migration tool.

Read the source and full CLI reference
Shell
$ cargo install --git https://github.com/B-Divyesh/sf-migration-replay-gate

$ mrg gate \
    --command "npm run migrate" \
    --baseline fixtures/baseline.sql \
    --partial fixtures/partial.sql \
    --json

Hard safety boundary

It cannot be pointed at production.

There is no connection-string option. MRG removes ambient Postgres targets, injects a loopback-only disposable URL, and tears the labeled container down after success, failure, or timeout.