pgschema
pgschema copied to clipboard
Terraform-style, declarative Postgres schema migration. Agent friendly.
## Summary `pgschema dump` assigns the wrong `LANGUAGE` to overloaded functions. When two functions share the same name but have different languages (e.g., one `sql` and one `plpgsql`), the dump...
I'm evaluating pgschema vs. [pgroll](https://github.com/xataio/pgroll/tree/main) which promises zero-downtime (and safe rollback) migrations by using virtual schemas. But in the case of pgroll I would have to manually construct the migration...
## Summary `pgschema plan` produces a false-positive `ALTER POLICY` that **silently truncates string literals** containing dots in `USING`/`WITH CHECK` expressions. Applying this plan would break RLS policies. ## Environment -...
## Bug: RLS Policies Generated Before Referenced Tables Exist First, thank you for building pgschema. It’s been a really useful tool for managing PostgreSQL schemas as code. I ran into...
Full repro here https://github.com/pettijohn/pgschema-bug - run `schema/apply.sh` Using v1.8.0 ``` CREATE TYPE my_input AS ( id uuid ); CREATE OR REPLACE FUNCTION f_test(p_items my_input[]) RETURNS integer LANGUAGE sql AS $$...
Hi, first of all thanks for the great work on pgschema. I ran into an issue after upgrading from v1.7.4 to v1.8.0 related to RLS policies. It looks like function...
Hey! I found this project today and it looks promising. I tried looking for a place to ask questions but github discussions are disabled and I couldn't find a forum...
To reproduce, apply these two schema documents in sequence: ```sql CREATE TABLE a (id bigint PRIMARY KEY, b_id bigint); CREATE TABLE b (id bigint PRIMARY KEY); ALTER TABLE a ADD...
Related to #382 (was posted as a follow-up but was not addressed by #383): a constraint that needs to be reconfigured due to its source column being renamed is planned...
When adding an INDEX with an INCLUDE, the schema dump adds it as part of the indexed columns. ## Repro SQL code ```sql CREATE SCHEMA test; CREATE TABLE test.test_table (...