This package is a migration tool for Sequelize with TypeScript decorators (sequelize-typescript), generating migration files by scanning model decorators to detect changes. Version 0.0.1-beta.9 is the latest, based on a fork fixing an issue in getDiffActionsFromTables.ts. It is inspired by Django's makemigration but for Sequelize, and it supports only sequelize-typescript model code (not raw Sequelize). The tool generates both up and down functions automatically, though down actions may sometimes fail due to relation ordering. Maintenance is sporadic, and the package is in beta with limited community support.
npm install sequelize-typescript-migration-rafaeltabNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Generates a migration file by scanning sequelize-typescript models. Adjust database config and model path accordingly.
Manually adjust generated migration code to ensure correct order of operations.
Evaluate alternatives like sequelize-cli or umzug for production use.
Ensure all models use @Table and @Column decorators from sequelize-typescript.
Run 'npm install sequelize-typescript-migration' and verify import path matches package name.
Use 'import { SequelizeTypescriptMigration } from 'sequelize-typescript-migration''