A Node.js database migration system that allows creating and running migrations with up/down functions. Currently at version 0.4.12, it provides a CLI for generating migration files, migrating, and rolling back. Key differentiators include a schema builder with Blueprint for table operations (create, alter, drop), TypeScript support, and a simple batch-based migration tracking system. It supports MySQL, PostgreSQL, and SQLite. The package is minimal and lightweight but lacks features like seeding or advanced error handling.
npm install migrationjsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to define a migration class with up/down methods using Schema and Blueprint to create a 'users' table.
Create a 'migrations' folder in your project root, or configure the path in migrationjs.conf.json.
Always implement a matching 'down' that drops/alters what 'up' created.
Change imports: import { Migration } from 'migrationjs' instead of import Migration from 'migrationjs'.Replace Schema.drop with Schema.dropIfExists to avoid errors when table doesn't exist.
Install migrationjs locally: npm install migrationjs --save-dev, then use npx migrationjs migrate.
Use import { Schema } from 'migrationjs'.Export default a class that extends the Migration class.