Sequelize-typescript-migration is a migration tool for Sequelize with TypeScript, based on sequelize-typescript decorators. It scans models and decorators to detect changes and generates migration JavaScript files with up/down functions automatically, similar to Django's makemigration. Version 0.0.4 is the latest and only stable release, with no active updates since 2020. It does not support plain 'sequelize' models (non-decorated). The tool is a TypeScript fork of sequelize-auto-migrations. Known limitations: undo (down) actions may fail due to relation ordering; users may need to manually fix generated migrations. It requires node >=10 and is intended for use with sequelize-typescript.
npm install sequelize-typescript-migration-customNo 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 definitions against database. Must use sequelize-typescript decorators.
Ensure all models use @Table, @Column, @ForeignKey etc. from 'sequelize-typescript'.
After generation, manually review and test down commands. Reorder operations if needed.
Consider alternatives like Umzug or sequelize-auto-migrations. Fork and update if necessary.
No built-in config for ESM output; manually convert generated files or use a transpiler.
Test with your Node version; consider upgrading package or using alternative.
npm install sequelize-typescript
Use: import { SequelizeTypescriptMigration } from 'sequelize-typescript-migration'Pass models path or add models explicitly: new Sequelize({ ..., models: [__dirname + '/models'] })Ensure models directory contains valid sequelize-typescript model files.