Auto-generates migration scripts from sequelize-typescript models by scanning decorators to detect changes and produce migration code with up/down functions, similar to Django's makemigration. Version 1.0.0 targets sequelize v6 and sequelize-typescript v2. Fixes several unresolved issues from predecessor (kimjbstar/sequelize-typescript-migration) including @Index support and PostgreSQL 'relation sequalizemeta does not exist'. Adds snapshot file storage, prettier formatting, and enhanced index handling with underscore option.
npm install sequelize-typescript-mysql-migrationNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates creating a Sequelize instance with models, then generating a migration file using the package's generateMigration function.
Consider using sequelize-migrate or umzug for more robust migration handling.
Ensure snapshotDir is included in your repository and not in .gitignore.
If using PostgreSQL or other dialects, test thoroughly or consider alternatives.
Pass the correct path to your model files in the Sequelize constructor.
Run 'npm install --save-dev sequelize-typescript-model-migration'
Ensure Sequelize is instantiated with 'models' option pointing to valid TypeScript model files.
If expecting changes, delete existing snapshot file and rerun generateMigration.