db plan
Generate a schema diff showing what changes will be applied.
Usage
postkit db plan
Options
| Option | Description |
|---|---|
-v, --verbose | Enable verbose output |
--json | Output as JSON |
What It Does
- Combines all schema files from
db/schema/into a single SQL file (excludinginfra/,grants/,seeds/) - Runs
pgschema planto compare against local database - Saves a schema fingerprint (SHA-256 hash of source files) for validation during apply
- Displays the migration plan and saves to
.postkit/db/plan.sql
Requirements
- An active session must exist (run
db startfirst)