pgschema
pgschema copied to clipboard
Terraform-style, declarative Postgres schema migration. Agent friendly.
The **like** operator is currently not supported. Not sure how complex this would be to implement :) Example ```sql create table _template_timestamps ( created_at timestamptz not null default now(), updated_at...
Followup on #6 Thanks for the quick fix! Unfortunately, it only seems to work for schema names that contain only lowercase characters. However, if I have a schema like "GFJTA"...
With relatively simple examples, everything works fine. Something about this example triggers writing out the coalesce expressions as an empty string. ``` ### Obfuscated Table DDL (in `marcintest` schema) CREATE...
Right now pgschema wants to manage all the objects in a schema. If an object is missing from pgschema’s local schema file pgschema generates a drop. This is all very...
Similar to sqxl-cli: https://github.com/launchbadge/sqlx/tree/main/sqlx-cli#usage
I made some changes to .sql file that I dumped from "pgschema dump" and when i ran: pgschema plan --host xxxxxxxxxxxxxxxxx.rds.amazonaws.com --db xxxxxxxxxxxxxxxxx --user xxxxxxxxxxxxxxxxx --password xxxxxxxxxxxxxxxxx --schema schema --file...
When I try to follow installation instructions I get an error https://www.pgschema.com/installation ``` >ver Microsoft Windows [Version 10.0.19045.6332] >go version go version go1.25.1 windows/amd64 >go install github.com/pgschema/pgschema@latest go: downloading github.com/pgschema/pgschema...
pgschema works with .pgpass. The docs don't mention that.
Here is some output from pgschema (latest release) (line numbers etc are generated by [bat](https://github.com/sharkdp/bat)): ``` ───────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── │ File: schemas/public/procedures/etl_refresh_supply_chain_direction_suppliers_graph.sql ───────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 1 │ -- 2 │ -- Name: etl_refresh_supply_chain_direction_suppliers_graph; Type:...
Same user in both cases. Once again this is a proc owned by a role I don't have. ``` ~/dev/repos/clientdatamart 🌳tryout-pgschema$ pgschema --debug dump --host dib.prod.bvgs.co --db dib --user marcintustin...