Registry / database / migratify

migratify

JSON →
library2.0.6jsnpmunverified

Migratify is a CLI-based MySQL database migration tool for Node.js projects, currently at version 2.0.6. It enables developers to manage schema changes through migration files, supporting database creation, table creation/updating, foreign keys, rollbacks, schema dumps, and loading migrations from existing databases. A newer feature is the database dispersion tool for syncing development databases. It uses JavaScript-based migration files and is available via npm. No recent updates or security incidents noted; package appears stable but low-maintenance.

npm install migratify
INSTALL
IMPORT
SIG · MIGRATIFY
M
migratify
databasejavascriptv2.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.

Table
const { Table } = require('migratify/Migration.class');
const { Table } = require('migratify');
Table class exported from a subpath; import path includes 'Migration.class'

Basic workflow: install globally, create database via CLI, generate table migration, edit table definition, run migrate.

// Global install required for CLI // Create database: // $ migratify create-db // Prompts for db name, host, username, password // After creation, migrations folder generated // Create a table: // $ migratify create-table users // Then edit the generated file: const { Table } = require('migratify/Migration.class'); let newTable = new Table('users'); newTable.setId('id'); newTable.addColumn('name', 'VARCHAR(100)').setNullable(false); newTable.addColumn('email', 'VARCHAR(255)').setUnique(true); module.exports = async () => { newTable.create(); }; // Run migration: // $ migratify migrate
Debug
Known issues
gotchaMigratify must be installed globally for CLI usage; local install only provides the Migration.class utility.
fix
Use npm install -g migratify for CLI; local install is optional.
affects: >=2.0.0
gotchaImport path for Table class includes 'Migration.class' subpath; incorrect import from main package fails.
fix
Use require('migratify/Migration.class') instead of require('migratify').
affects: *
gotchaMigration files are CommonJS (require/exports) not ESM; using import will break.
fix
Use module.exports = async () => { ... }
affects: *
deprecatedNo TypeScript types provided; package is JavaScript only.
fix
Manually define types or use JSDoc if needed.
affects: *
Errors
Common errors & fixes
migratify: command not found
Migratify installed locally but not globally.
fix
Run 'npm install -g migratify' to install globally.
Cannot find module 'migratify'
Incorrect import path for Table class.
fix
Use require('migratify/Migration.class')
TypeError: newTable.create is not a function
Migration file not exporting a function properly.
fix
Ensure module.exports = async () => { newTable.create(); }
Upgrade
Version history
2.0.6latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources