A forward-only PostgreSQL migration tool using Postgres.js. Current stable version is 3.2.0. Released as needed on GitHub. Key differentiators: uses Postgres.js library, supports SQL and JS/ESM migration files, relies on environment variables for database connection, optional ROLE setting for privilege management. Minimal and focused on forward-only migrations without down migrations.
npm install sqergeNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a migration directory with SQL and JS files, then runs sqerge with environment variables for database connection.
Upgrade Node.js to version 20 or higher.
Install postgres@^3.x as a dependency.
Migrate from 'pg' to 'postgres.js' and update any custom migration scripts.
Ensure all migration files follow the pattern '<integer>-<any-name>.sql' or '<integer>-<any-name>.js' or '<integer>-<any-name>.mjs'.
Ensure the database user has permission to assume the specified role (e.g., via membership).
Run 'npm install postgres' in your project.
Grant the role to the user or remove the ROLE variable.
Rename file to e.g., '1-foo.sql'.