{"library":"pgterra","type":"library","category":null,"description":"pgterra (v0.2.19) is a declarative PostgreSQL schema management tool that generates SQL migration statements by comparing a target schema.sql file against the current state of a PostgreSQL database. Unlike imperative migration tools (e.g., knex, node-pg-migrate), users define the desired schema in a single SQL file and Terra computes the ALTER TABLE, CREATE INDEX, etc. statements needed to reach that state. Written in TypeScript with ESM-only distribution, it supports tables, columns, functions, triggers, sequences, constraints, indexes, enums, views, and procedures. Released under an MIT license with low release cadence, it is primarily a CLI tool (pgterra plan / apply) but can also be used programmatically. Requires Node >=18 and TypeScript ^5.8.3 as a peer dependency.","language":"javascript","status":"active","version":"0.2.19","tags":["javascript","postgres","postgresql","schema","migration","database","declarative","cli","sql"],"last_verified":"Fri Jun 05","install":[{"cmd":"npm install pgterra","imports":["import { Terra } from 'pgterra'","import { generateMigrationSQL } from 'pgterra'","import type { TerraOptions } from 'pgterra'"]},{"cmd":"yarn add pgterra","imports":[]},{"cmd":"pnpm add pgterra","imports":[]}],"homepage":"https://github.com/elitan/pgterra#readme","github":"https://github.com/elitan/pgterra","docs":null,"changelog":null,"pypi":null,"npm":"pgterra","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":null}