Registry / database / sequelize-typescript-migration-engine

sequelize-typescript-migration-engine

JSON →
library0.0.6jsnpmunverified

A TypeScript-native migration engine for Sequelize that allows writing migrations as TypeScript files with full type safety. Current stable version is 0.0.6, last updated in 2021. It is a lightweight alternative to umzug, offering a simple API for up/down migrations with transaction support. Key differentiators: uses TypeScript directly without compilation step, supports queryInterface from Sequelize, and has a straightforward init() method. However, it is not actively maintained and may lack features like logging or CLI tools.

npm install sequelize-typescript-migration-engine
INSTALL
IMPORT
SIG · SEQUELIZE-TYPESCRI
S
sequelize-typescript-migration-engine
databasejavascriptv0.0.6
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

MigrationEngine
import { MigrationEngine } from 'sequelize-typescript-migration-engine'
const MigrationEngine = require('sequelize-typescript-migration-engine')
ESM-only; require() will not work because package lacks CJS support.
MigratorEngine
import { MigratorEngine } from 'sequelize-typescript-migration-engine'
Typo in docs; actual export is MigrationEngine, but MigratorEngine is not exported.

Initializes a MigrationEngine with Sequelize instance, migrations folder, and target version, then runs init() to apply migrations.

import path from 'path'; import { MigrationEngine } from 'sequelize-typescript-migration-engine'; import { Sequelize } from 'sequelize'; const sequelize = new Sequelize(process.env.DATABASE_URL ?? ''); const migrationFolder = path.join(__dirname, 'migrations'); const engine = new MigrationEngine(sequelize, migrationFolder, '2021_01_02'); async function migrate() { await engine.init(); console.log('Migrations complete'); } migrate().catch(err => console.error(err));
Debug
Known issues
breakingExport name is 'MigrationEngine', not 'MigratorEngine' as shown in some documentation examples.
fix
Use 'MigrationEngine' in imports.
affects: 0.0.6
gotchaPackage requires TypeScript and ts-node at runtime because it imports .ts migration files directly.
fix
Ensure ts-node is installed and configured.
affects: >=0.0.0
deprecatedPackage has not been updated since 2021 and may be abandoned.
fix
Consider using umzug or a more recent migration tool.
affects: 0.0.6
Errors
Common errors & fixes
Cannot find module 'sequelize-typescript-migration-engine'
Missing dependency or incorrect installation.
fix
Run 'npm install sequelize-typescript-migration-engine' and ensure it is in package.json.
TypeError: MigratorEngine is not a constructor
Using wrong export name (MigratorEngine instead of MigrationEngine).
fix
Replace 'MigratorEngine' with 'MigrationEngine' in import and instantiation.
Error: Migration file XXX.ts must export 'up' and 'down' functions
Migration files missing required exports or syntax error.
fix
Ensure each migration file exports async functions named 'up' and 'down'.
Upgrade
Version history
0.0.6latest on npm
Audit
Dependencies
sequelizerequiredpeer dependency - migration engine works with Sequelize ORM
Agent activity
19 hits · last 30 days
node
12
Meta
2
Amazon
1
Resources
sequelize-typescript-migration-engine — npm install sequelize-typescript-migration-engine · libregistry