A migration tool for Sequelize and TypeScript users, providing a streamlined way to generate and run database migrations from annotated Sequelize models. Version 2.0.3 targets Node.js >=12 and ships TypeScript types. Compared to alternatives like sequelize-cli or umzug, this package focuses on seamless TypeScript integration and automatic migration creation from model definitions, reducing boilerplate. It is a community fork of the original sequelize-typescript-migration with continued updates.
npm install sequelize-typescript-migration-updatedNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Generates a migration file from Sequelize model definitions in TypeScript, using SQLite as an example database.
Use dynamic import or set 'type': 'module' in package.json for static import.
Switch to 'sequelize-typescript-migration-updated' for active development.
Ensure modelPath points to .ts files or compile models to .js in the same directory.
Change to dynamic import: const { generateMigration } = await import('sequelize-typescript-migration-updated');Verify sequelize is an instance of Sequelize (not a model or QueryInterface).
Use absolute path and ensure models are TypeScript files or compile them before using.