Migreat is a migration tool for Sequelize that simplifies schema management by allowing you to define models and associations declaratively, then automatically generating TypeScript migration files. Current stable version is 7.0.0, with a focus on type safety and developer experience. Unlike raw Sequelize migrations, Migreat provides a higher-level abstraction to define schemas and generate migrations programmatically, reducing boilerplate and manual SQL. It supports both initial schema generation and incremental migration from existing schemas.
npm install sequelize-migreatNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to define a model, create a schema, generate a migration, and execute it using Sequelize.
Use import syntax or dynamic import() instead of require()
Import Attribute and Association directly from 'sequelize-migreat'
Always wrap in array: new SchemaDef([model])
Pass the new schema definition as the second argument
Change to import syntax or set { "type": "module" } in package.jsonUse import { Migreat } from 'sequelize-migreat'