pgschema
pgschema copied to clipboard
Terraform-style, declarative Postgres schema migration. Agent friendly.
## Environment - pgschema 1.13.1 - PostgreSQL 18.6 ## Minimal reproduction Use two empty databases: a target database and a planning database. Create `schema.sql`. The table appears before the composite...
## Environment - pgschema 1.13.1 - PostgreSQL 18.6 ## Minimal reproduction Use two empty databases on the same server: a target database and a planning database. Set the connection variables...
**Version:** v1.13.1 (also v1.13.0) When one apply both adds a column to an existing table and creates a `LANGUAGE sql` function whose body reads that column, the plan emits `CREATE...
## Summary When a view's column changes type, pgschema plans `CREATE OR REPLACE VIEW`, which PostgreSQL rejects: `CREATE OR REPLACE VIEW` cannot change the data type of an existing column....
## Problem `pgschema dump` omits comments on table constraints, including distinct comments on inherited partition constraints. Replay loses those comments, while a subsequent plan can still be empty. ## Reproduction...
## Summary After interrupting a pgschema-generated `CREATE INDEX CONCURRENTLY`, PostgreSQL retains the named index with `indisvalid = false`. Running `pgschema plan` again against the unchanged desired schema produces an empty...
## Enhancement request Please support resuming a completed online index replacement without dropping and rebuilding its already valid replacement candidate, when its owning table, complete definition, and health have been...
Hi, I'm currently evaluating the use of this project in our product. The use case would be to handle database migrations in SAAS deployments (GH Actions) as well as potentially...
## Summary A legal 63-byte index name cannot be replaced through the online rewrite. Appending `_pgschema_new` produces a 76-byte candidate identifier which PostgreSQL truncates back to the original name. Creation...
When a function change is planned as `DROP FUNCTION` + `CREATE FUNCTION` (e.g. a return type change), the plan does not re-emit `COMMENT ON FUNCTION`. The `DROP` removes the comment,...