pgschema icon indicating copy to clipboard operation
pgschema copied to clipboard

Terraform-style, declarative Postgres schema migration. Agent friendly.

Results pgschema issues
Sort by recently updated
recently updated
newest added

Old schema: ```sql GRANT UPDATE ON sometable TO app_user; ``` New schema: ```sql GRANT UPDATE (somecolumn) ON sometable TO app_user; ``` Generated migration: ```sql GRANT UPDATE (somecolumn) ON TABLE sometable...

Old schema: ```sql CREATE OR REPLACE FUNCTION somefunction( param1 text ) [...] ``` New schema: ```sql CREATE OR REPLACE FUNCTION somefunction( param2 uuid ) [...] ``` Generated migration: ```sql CREATE...

# `pgschema dump` does not quote 13 PostgreSQL reserved keywords used as identifiers ## Summary `pgschema dump` (v1.7.2) emits unquoted column names for several PostgreSQL reserved keywords. The dumped SQL...

## Summary `pgschema plan` perpetually reports a "modify function" diff for any `plpgsql` function that is `IMMUTABLE` and returns a user-defined type (e.g. a custom enum). Re-running `plan` or `apply`...

As the title says, it would be super helpful to have it as a nix package. For our case it would be used twofold: 1. Being used in the local...

pgschema 1.7.3 with file mode and plan database, PG 18, Ubuntu 24.04 Minimal repro here: https://github.com/pettijohn/pgschema-bug Run [apply.sh](https://github.com/pettijohn/pgschema-bug/blob/main/schema/apply.sh) and get `Error: failed to apply desired state: failed to apply schema...

### Description: Currently, `.pgschemaignore` supports ignoring database objects by type: `[tables]`, `[views]`, `[functions]`, `[procedures]`, `[types]`, and `[sequences]`. However, there's no way to ignore GRANT or REVOKE statements in privilege files,...

I have this trigger. ```sql CREATE OR REPLACE TRIGGER user_account_encrypt_secret_trigger_email BEFORE INSERT OR UPDATE OF email ON user_account FOR EACH ROW EXECUTE FUNCTION user_account_encrypt_secret_email(); ``` but it pgschema generates plan...

Currently plan does not recognize when view is created with `security_invoker = true`. All of views I use require Row Level Security to be inherited from the tables. This ```sql...

Imagine the following case using the `#>>` operator (which returns a `text[]` array): ```sql CREATE TABLE repro ( id uuid DEFAULT gen_random_uuid() PRIMARY KEY, data jsonb DEFAULT '{}' ); CREATE...