Developer releases Pistachio, a declarative schema management CLI for PostgreSQL
A developer has released Pistachio, an open-source command-line tool that manages PostgreSQL schemas declaratively, similar to how Terraform handles infrastructure. Users define their desired database schema in a single SQL file, and the tool automatically computes and applies the difference against the live database using a plan-then-apply workflow. Pistachio uses PostgreSQL's own parser via the pg_query_go library, keeping it lightweight while supporting a broad range of objects including tables, views, enums, triggers, functions, and row-level security policies. The tool was created after the author found existing alternatives like sqldef and pgschema either lacked SQL compatibility or required a heavier embedded PostgreSQL setup. To adopt it on an existing database, users can run a single dump command to generate the initial schema file and manage all future changes from there.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in