Stop encoding intent as migration choreography
Migration-heavy workflows force teams to reason about intermediate steps, ordering, and drift repair. `pgpac` shifts the unit of work back to the schema itself: define the desired state in SQL, keep that state in Git, and plan from the target database's current reality.
01
Model the schema you want
Tables, views, functions, types, and security live as source-controlled SQL files.
02
Diff desired state against reality
pgpac inspects the target database and generates an ordered plan from actual drift.
03
Apply with reviewable safety gates
Teams can inspect text, JSON, or SQL output before execution, with destructive changes explicitly gated.
Git is the timeline
The SQL files are the desired schema. History, review, and rollback discussion stay in normal source control where teams already work.
The target database is the comparison point
Plans are produced by comparing the packaged desired state with what PostgreSQL actually contains, not by assuming every migration ran perfectly.
Change execution stays explicit
Build artifacts, inspect the computed plan, and apply with destructive-operation gates when the team intentionally allows them.