pgschema
pgschema copied to clipboard
Terraform-style, declarative Postgres schema migration. Agent friendly.
**old.sql** ```sql CREATE TABLE IF NOT EXISTS merge_request ( data jsonb NOT NULL ); ``` **new.sql** ```sql CREATE TABLE IF NOT EXISTS merge_request( data jsonb NOT NULL, iid integer NOT...
This snippets is between dump and plan without file modifications. **Dump** ```sql CREATE OR REPLACE TRIGGER set_updated_at BEFORE UPDATE ON tbl FOR EACH ROW WHEN (NEW.description IS DISTINCT FROM OLD.description)...
```sql CREATE TABLE IF NOT EXISTS commit ( id text PRIMARY KEY, git_repository_id integer NOT NULL REFERENCES git.repository (git_repository_id) ); ``` Plan after dump && plan without file modifications ```sql...
The `pgschema` CLI (v1.1.1) does not appear to load database connection variables from a `.env` file. When the command is run, it ignores the `PGHOST`, `PGPORT`, and other variables defined...
This trigger not dumped from pg ```sql create trigger audit_trigger_stm after truncate on git.repository execute procedure audit.if_modified_func('true'); ```
Very interesting project! I'm using Drizzle ORM for my schema migration, I'm wondering if pgschema would bring any benefit? Could it be used in collaboration with the tool, or would...
pgschema looks to be exactly what I've been looking for for a while - thanks! I have a Modular Schema Files setup with many files in folders by type: schema/...
This proposal introduces a system for managing rich, multi-line schema documentation directly in `.sql` files using a special `---` comment syntax, inspired by languages like Dart. The `plan` command will...
It would be *nice* to have the lines in main.sql have a stable order so that changes in the order of the lines reflect a change in the contents of...
I have a materialized view with a where clause like this ``` WHERE pp.item_name IS NOT NULL AND r.supplier_id IS NOT NULL ``` Unfortunately pgschema is dumping that as ```...