Opinionated, SQL-powered migration tool for PostgreSQL. Current version is 1.4.1; releases are frequent. It differentiates from tools like Flyway or node-pg-migrate by focusing on direct SQL writing, watch mode for auto-migration during development, and declarative function/trigger management.
npm install graphile-migrateNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Connects to PostgreSQL and runs all pending migrations using runMigrations and parseSettings.
Use async/await with runMigrations.
Replace calls to migrate() with runMigrations().
Set DATABASE_URL environment variable and pass connectionString: process.env.DATABASE_URL
Write migrations using DROP IF EXISTS, CREATE OR REPLACE, etc.
Use dynamic import or enable ESM in Node.js.
Set process.env.DATABASE_URL or pass connectionString in parseSettings.
Run `npm install graphile-migrate`.
Use `import { migrate } from 'graphile-migrate';` or use default import with `.default` if using require.Ensure migration files are in the correct directory (default 'migrations/').