pg-toolbox
JSON →pg-toolbox is a CLI tool for PostgreSQL database migrations, rollbacks, seeding, and truncation, designed to be used alongside the slonik SQL client. Version 1.1.34 is marked as unstable and not recommended for production—the author advises waiting for v1.2+. Unlike Knex.js or ORMs, this package promotes writing pure SQL to strengthen SQL skills. It has zero production dependencies, using dotenv and slonik only as dev dependencies. Both CJS and ESM module formats are supported, but the API is subject to breaking changes until v1.2. Migrations are ordered alphabetically, and files must export an async function returning an object with migrate/rollback/seed/truncate keys containing slonik SQL tagged templates.
Resources
packagepg-toolbox ↗