Tiny Postgres Migrator is a lightweight, zero-config database schema migration tool specifically designed for the 'postgres' Node.js driver (ESM-native). Version 2.0.0 runs entirely from the command line or programmatically, supports both async/await and simple SQL file migrations. Unlike larger ORM-based tools (e.g., Sequelize, TypeORM), it offers minimal overhead, no external dependencies besides 'postgres', and a straightforward up/down migration pattern with plain SQL files. The library has a monthly release cadence and is actively maintained for bug fixes and Node.js compatibility.
npm install tiny-postgres-migratorNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows programmatic usage: connect to PostgreSQL, run all 'up' migrations from a directory, and close the connection.
Update imports: either use named import { migrate } or default import with object destructuring.Switch to programmatic usage using the 'migrate' function.
Ensure each migration file exports at least an 'up' function. Example: export async function up(sql) { ... }.Always provide a 'migrationsTable' in the config object.
Upgrade to Node.js 18 or later.
Install the peer dependency: npm install postgres
Add "type": "module" in package.json or rename file to .mjs
Use dynamic import: const { migrate } = await import('tiny-postgres-migrator');