A migration generation tool for Sequelize with TypeScript decorators (sequelize-typescript). Version 1.4.5 scans model decorators to detect schema changes and auto-generates up/down migration files, similar to Django's makemigration. Compatible with sequelize v6 (use ~2.0.0) and v4 (use ~1.0.0). Requires Node >=12. Key differentiator: automatic diff-based migration for decorator-based models, reducing manual migration writing. Development is sporadic; forked from multiple community repositories. Down migrations may be unreliable due to relation ordering issues.
npm install ht-sequelizeNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Generates a migration file by comparing current model decorators to existing database schema. Run this after defining/updating models.
Use sequelize-typescript decorators (@Table, @Column, etc.) on your models.
Manually edit the down migration order or review generated migration files before running.
Test thoroughly in development before using in production. Consider alternatives like sequelize-auto-migrations.
Always provide a descriptive migrationName in options.
Use `new Sequelize({ models: [__dirname + '/models'] })` or explicitly add models via `sequelize.addModels([...])`.Use `SequelizeTypescriptMigration.makeMigration(sequelize, options)` directly, no instantiation needed.