A migration tool for Sequelize with TypeScript models using decorators. Version 3.2.9 is the latest stable release, compatible with sequelize ~6. It automatically detects changes between model definitions and the current database schema, generating migration files (like Django's makemigrations). Only supports models defined with sequelize-typescript decorators, not raw Sequelize models. This LTS fork merges fixes from multiple forks of the original project. Release cadence is irregular. Key differentiator: eliminates manual up/down function writing for TypeScript projects.
npm install sequelize-typescript-migration-lts2No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Generates a migration file by comparing Sequelize models with the database, using in-memory SQLite.
Ensure all models use @Table, @Column, etc. from 'sequelize-typescript'.
Review generated down commands for correct order; reorder manually if needed.
Upgrade to sequelize@6 and sequelize-typescript-migration-lts2@~2.0.0 or later.
Migration output is .js; write custom scripts if TypeScript output needed.
Use `import { SequelizeTypescriptMigration } from 'sequelize-typescript-migration-lts2'`Run `npm install sequelize-typescript-migration-lts2` and verify import path.
Ensure Sequelize is initialized with model paths: `new Sequelize({ models: [__dirname + '/models'] })`