pgschema
pgschema copied to clipboard
Terraform-style, declarative Postgres schema migration. Agent friendly.
Given the following database definition: ```sql create type some_type as enum ('value1', 'value2'); create type some_other_type as (name text, type some_type); create table some_table(id serial primary key, data some_other_type); ```...
This case comes from a misunderstanding that indexes can be nested under schemas by quoting the name, which obviously is kind of silly, nevertheless it's a legal database definition so...
given the following database definition: ```sql CREATE EXTENSION IF NOT EXISTS citext WITH SCHEMA public; create table some_table(id serial primary key, email citext); ``` `pgschema dump` produces the following output:...
We still have darwin/amd64 machines around, would it be possible to release binaries for this platform? Thanks. Happy to send a PR.
I added the following index: ```sql CREATE UNIQUE INDEX workstations_name_idx ON workstations(name) WHERE (status 'deleted'::workstation_status); ``` Which applied fine the first time, but now every time I run `pgschema` it...
Excellent tool! I ran into this issue when dumping my schema where policies are not dumped with their names quoted; I fixed them manually but this can be breaking in...
It would be great to support `FORCE ROW LEVEL SECURITY` in addition to the existing `ENABLE ROW LEVEL SECURITY` support. ### Background PostgreSQL provides two separate RLS controls: - `ALTER...
# Bug: Interval type cast stripped from function parameter defaults in migration SQL ## pgschema version 1.5.1 ## PostgreSQL version 14.17 ## Description When generating migration SQL for functions that...
In pgschema 1.5.1, column default expressions lose schema qualifiers when dumping non-public schemas. For example `(my_schema.get_default_status())::my_schema.status` becomes `(get_status())::status`. As far as I can tell, this appears to be unintentional. **Reproduction:**...
## Problem When using `pgschema plan` against a database with RLS policies that reference functions in the `public` schema, pgschema reports changes even when the policies are semantically identical. This...