umzug
Installation
SKILL.md
Umzug v3 — Claude Skill (Sequelize v7 Adapted)
Key Concepts
- Umzug is not an ORM — it orchestrates running/reverting migration functions and tracking which have been executed
- The
contextoption passes any value to every migration'sup/down— for Sequelize, usesequelize.getQueryInterface() SequelizeStoragetracks executed migrations in a database table (SequelizeMetaby default)- Migrations are discovered via glob patterns or provided as an inline array
- Built-in CLI via
umzug.runAsCLI()— supportsup,down,pending,executed,create - Import from
'umzug':Umzug,SequelizeStorage,JSONStorage,MongoDBStorage,memoryStorage,MigrationError
Sequelize v7 Specifics
- Import Sequelize from
@sequelize/core(notsequelize) - Import dialect classes:
PostgresDialect,SqliteDialect,MysqlDialect, etc. DataTypesfrom@sequelize/corefor migration column definitions- Sequelize v7 constructor takes a single options object (no URL string as first arg)
- CLS transactions enabled by default — use
sequelize.transaction()for managed,sequelize.startUnmanagedTransaction()for unmanaged dialectOptionsremoved — settings go in top-level options