Schema diff and migration engine for ORMs (Drizzle, Prisma, TypeORM). Current stable version is 1.3.0. It replaces linear migration files with a DAG-based approach using content-addressed IDs (SHA-256), enabling deterministic migrations, drift detection, and safe CI/CD workflows. Key differentiators: auto-generated SQL from ORM schema (no hand-written migrations), conflict detection at merge time, and support for Postgres and MySQL. Requires Node >=18.
npm install migratexNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows initializing migratex, diffing schema, checking graph validity, applying migrations, and detecting drift — all using the programmatic API.
Upgrade Node to >=18.
Use ESM import syntax. If you must use CJS, consider a dynamic import inside an async function.
Import them from 'migratex/check' and 'migratex/apply' respectively.
Ensure your database supports advisory locks (PostgreSQL, MySQL 5.7+). For unsupported databases, use the --no-lock flag.
Recreate your migration history by running 'migratex init --rebase' to convert old migrations to DAG format.
Add "type": "module" to your package.json or rename the file to .mjs.
Ensure you have migratex >=1.0.0 and import from 'migratex/check' (not 'migratex').
Use import migratex from 'migratex' inside an async context.
Upgrade MySQL to 5.7+ or use --no-lock flag (but risk race conditions).
No dependency data recorded yet.