pkg.soopen package index

brew / rank 5385

Install pg-schema-diff with Homebrew, Nix

Diff Postgres schemas and generating SQL migrations. Version 1.0.9 via Homebrew; verified 2026-09-13. Also installable with nix: nix profile install nixpkgs#pg-schema-diff.

install

Additional install commands

macOS

Homebrewverified · 100%
brew install pg-schema-diff

local Homebrew formula metadata

Linux

Nixverified · 92%
nix profile install nixpkgs#pg-schema-diff

nixpkgs package indexes · pkgs/by-name/pg/pg-schema-diff/package.nix · source: api.github.com

overview

Package summary

Diff Postgres schemas and generating SQL migrations

Commands and aliases

  • pg-schema-diff

history

Project history and usage

pg-schema-diff is a Stripe-maintained Go library and CLI for comparing PostgreSQL schemas and producing migration plans designed to minimize downtime and locking.

Project history

Stripe developed pg-schema-diff to compare PostgreSQL schemas and generate the SQL needed to transform one into another. The project grew around online-migration techniques, temporary-database validation, hazard reporting, partition support, and both CLI and reusable Go-library interfaces.

Adoption history

Stripe publishes the project as both a Go library and a command-line program. Official installation instructions support `go install`, Go modules, and Homebrew, enabling use in application tooling and database deployment workflows.

How it is used

Users describe a desired database schema with one or more DDL files, compare it with a live database, inspect the generated plan and hazards, and then apply approved changes. The CLI accepts DSNs and recommends PGPASSWORD for supplying a password without embedding it in the connection string.

Why package nerds care

pg-schema-diff brings declarative, plan-oriented migration behavior to PostgreSQL while exposing operational hazards before execution. Database tooling enthusiasts care about its use of native concurrent and staged PostgreSQL operations to reduce locks and downtime rather than relying only on handwritten sequential migrations.

Timeline

  • Initial project direction: Published by Stripe as a PostgreSQL schema-diffing Go library and CLI.
  • Later development: Added safety-oriented planning features including hazard warnings, temporary-database validation, online index replacement, and strong partition support.
  • Package-manager adoption: Distributed through Homebrew in addition to the Go toolchain.

Related projects

  • The tool consumes PostgreSQL DDL and connection strings, uses native PostgreSQL migration operations, and publishes its library API through the official Go package documentation.

Sources

  • Official Go documentation: https://pkg.go.dev/github.com/stripe/pg-schema-diff
  • Official README: https://github.com/stripe/pg-schema-diff#readme

security posture

Risk level: blue

broad file, network, media, or database tool signal.

Risk classifier

blue risk · medium confidence · tool

Why

  • broad file, network, media, or database tool signal

Signals

  • text:sql

Install behavior

  • No Homebrew post-install hook is recorded in formula metadata.
  • Homebrew bottle metadata is available for 6 platform targets.
  • Build metadata lists 1 build dependencies.

Recommended review

Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.

executables

Installed executables

CommandKindExposureNote
pg-schema-diffcliglobal executable

freshness

Version and freshness

These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.

page generated2026-09-19
manager version1.0.9
manager updated2026-09-13
local dataok
upstreamcurrent
latest detectedv1.0.9

https://github.com/stripe/pg-schema-diff

  • okNo freshness warnings were generated.

install metadata

Package metadata

Package keybrew:pg-schema-diff
Version1.0.9
Package managerHomebrew
Package manager pagehttps://formulae.brew.sh/formula/pg-schema-diff
Homepagehttps://github.com/stripe/pg-schema-diff
Repositoryhttps://github.com/stripe/pg-schema-diff
LicenseMIT
Source archivehttps://github.com/stripe/pg-schema-diff/archive/refs/tags/v1.0.9.tar.gz
Last updated2026-09-13T11:21:35Z
Pulseupdated
Build dependenciesgo
Bottleavailable (on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux)
Homebrew post-installnot defined
Servicenone declared

registry facts

Source database details

Source DatabaseHomebrew formula API
Taphomebrew/core
Full Namepg-schema-diff
Version Scheme0
Revision0
Head VersionHEAD
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • head
  • stable

source database matches

Other package-manager records

Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.

Nix95%

pg-schema-diff

nix profile install nixpkgs#pg-schema-diff
  • normalized package name match
  • Matched by: Pg Schema Diff
nixpkgs package indexes · api.github.com · nixpkgs package indexes: pkgs/by-name/pg/pg-schema-diff/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

source trail

Generated from repository data

This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.

Used sources

  • Geiger risk classifier
  • cross-ecosystem install command graph
  • curated package history
  • external package-manager database matches
  • package relationship graph
  • package version freshness
  • package-page enrichment
  • pkg.so package database
  • pkgdb category and tag curation