Registry / database / umigrate

umigrate

JSON →
library0.4.73jsnpmunverified

Umigrate (v0.4.73, beta) is a Node.js CLI tool for database migrations, migration generation, and schema diffing. It supports MariaDB/MySQL via node-mariasql and wraps db-migrate for migration execution. It offers cross-database compatibility via a dumper that outputs generic SQL. The package is in early beta; backward compatibility is preserved but breaking changes may occur. It distinguishes itself by providing a unified migration, dump, and diff tool for multiple databases, though only one driver is currently implemented.

npm install umigrate
INSTALL
IMPORT
SIG · UMIGRATE
U
umigrate
databasejavascriptv0.4.73
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.

default (CLI)
npm install -g umigrate umigrate up
const umigrate = require('umigrate')
This is a CLI tool; there is no programmatic API.
none (library)
N/A - CLI only
No JavaScript exports. Use as a shell command.

Shows installation, configuration, creating a migration, running migrations, dumping schema, and diffing two databases using the umigrate CLI.

npm install -g umigrate # Create a database config file cat > database.json << 'EOF' { "dev": { "driver": "mysql", "host": "localhost", "user": "root", "password": "", "database": "test" } } EOF # Create a migration umigrate create my-first-migration # Run migrations umigrate up # Dump database schema umigrate dump # Diff two databases umigrate diffdb --d std:mysql://user:pass@localhost/db1 --d std:mysql://user:pass@localhost/db2
Debug
Known issues
breakingOnly MariaDB/MySQL is supported via node-mariasql; no PostgreSQL, SQLite, etc. in the current release.
fix
Use only with MySQL/MariaDB or wait for additional database drivers.
affects: <=0.4.73
gotchaThe migration engine is a wrapper around db-migrate; umigrate commands replace `db-migrate` but not all db-migrate options may work.
fix
Refer to db-migrate documentation for available commands and options.
affects: >=0.0.0
deprecatednode-mariasql is unmaintained and may have compatibility issues with modern Node.js versions.
fix
Consider forking or using a different migration tool that supports maintained drivers.
affects: >=0.1.0
gotchaThe package is in beta; APIs may change. Breaking changes are tagged with 'breaking changes' in GitHub issues.
fix
Monitor GitHub issues for breaking changes before upgrading.
affects: <=0.4.73
Errors
Common errors & fixes
Error: Cannot find module 'db-migrate'
Missing db-migrate dependency (not auto-installed with -g)
fix
Install db-migrate globally: `npm install -g db-migrate`
Error: connect ECONNREFUSED 127.0.0.1:3306
MySQL/MariaDB service not running or connection details incorrect
fix
Start the database server and verify credentials in database.json
Upgrade
Version history
0.4.73latest on npm
Audit
Dependencies
db-migraterequiredCore migration engine; umigrate delegates up/down/create commands to db-migrate
node-mariasqlrequiredMariaDB/MySQL driver for database operations
Agent activity
19 hits · last 30 days
node
16
Meta
1
OpenAI (training)
1
Resources
umigrate — npm install umigrate · libregistry