A CLI tool that generates Mermaid ER diagrams from Knex.js and Kysely database migrations. Version 0.4.0 supports MySQL, PostgreSQL, and SQLite, with output in Mermaid format. It parses migration files to produce visual representations of table schemas, foreign keys, and indexes. Differentiator: no runtime database connection needed for Knex; for Kysely, connection details are required. Active development with CI and coverage reported.
npm install migration-visualizerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Generate Mermaid ER diagram from a single knex migration file.
Provide --dialect, --migrations, and optionally --host, --port, --database, --user, --password (or --filename for SQLite).
Ensure migration filenames match the timestamp format (e.g., 20251227000006_create_likes.ts).
Use external Mermaid renderers (e.g., mermaid-cli) to convert to other formats.
Run: npx migration-visualizer visualize --orm knex ...
Add --dialect mysql2 or --dialect pg or --dialect sqlite3 to the command.
Use .ts or .js files for migration files, or rename the file accordingly.
No dependency data recorded yet.