pgsafe 0.8.6

Static safety linter for PostgreSQL DDL migrations — catches unsafe schema changes before they lock or break production.
Documentation

pgsafe

Static safety linter for PostgreSQL DDL migrations. pgsafe parses SQL and flags schema changes likely to lock or break production — no database connection, no network.

📖 Full documentation, the rules reference, and an in-browser playground: pgsafe.fixedwidth.tech

Install

Download a prebuilt binary from the latest release (static Linux and macOS), or build from source:

cargo build --release   # target/release/pgsafe

Quickstart

pgsafe migration.sql                 # lint a file (exit 1 on a finding)
pgsafe --format json migration.sql   # machine-readable
pgsafe --list-rules                  # every rule this build checks

Run it in CI with the GitHub Action:

- uses: fixed-width/pgsafe@v0.8.5
  with:
    files: "db/migrate/*.sql"

See pgsafe.fixedwidth.tech/docs for configuration, output formats, and the full rules reference.

License

Apache-2.0. See LICENSE.