Write the database you want
Keep the desired schema as ordinary SQL. Database changes become readable source-control changes.
pgpac buildd1pac build*pac (pronounced “Starpac”) is a family of focused desired-state database tools: pgpac for PostgreSQL and d1pac for Cloudflare D1.
Coming from SQL Server? Think DACPAC-style intent, built around each database's native SQL.
CREATE TABLE accounts ( id integer PRIMARY KEY, status text );The *pac loop
Keep the desired schema as ordinary SQL. Database changes become readable source-control changes.
pgpac buildd1pac buildCompare the immutable package with the live database and produce an ordered, inspectable plan.
pgpac pland1pac planApply the reviewed delta. Potentially destructive operations stay behind explicit safety gates.
pgpac applyd1pac applyA familiar idea, engine-native execution
If you know DACPAC, the mental model will feel familiar: package a declarative database model, compare it to a target, then publish the delta.
Explore pgpac documentationNo proprietary schema language. Your database definition remains readable by people and its native engine.
The live target is part of every comparison, so a plan starts from reality—not an assumption.
Build once, inspect text or JSON plans, then promote the same package through environments.
Your schema already has a destination.