Registry / database / merkel

merkel

JSON →
library0.1.3jsnpmunverified

merkel is a framework-agnostic database migration tool designed for Continuous Deployment with built-in rollback support. It generates UUID-based migration files to avoid conflicts in distributed git workflows, supports TypeScript via tsconfig detection, and integrates with git hooks. Currently at version 0.1.3 (no recent releases, appears abandoned), it provides up/down migration functions but lacks ecosystem adoption or maintenance.

npm install merkel
INSTALL
IMPORT
SIG · MERKEL
M
merkel
databasejavascriptv0.1.3
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.

up/down
export async function up() { ... } export async function down() { ... }
module.exports = { up: ..., down: ... }
Migration files export named functions, not objects. Use ESM or CJS exports.
merkel CLI
npx merkel generate
merkel generate # without installing globally
Use npx to avoid global install, or install locally as devDependency.
merkel.run()
import { run } from 'merkel'
const run = require('merkel')
Package provides a programmatic API, but main usage is CLI.

Shows installation, config generation, migration creation with up/down functions, and execution via CLI.

# Install locally as dev dependency npm install --save-dev merkel # Initialize config (creates .merkelrc.json and installs git hook) npx merkel init # Generate a new migration file (default directory ./migrations) npx merkel generate --name 'add_users_table' # Edit the generated file (e.g., ./migrations/<uuid>.js): import db from './db'; export async function up() { await db.query(`CREATE TABLE users ( id SERIAL PRIMARY KEY, name VARCHAR(100) NOT NULL )`); } export async function down() { await db.query(`DROP TABLE IF EXISTS users`); } # Run migrations on deploy (auto-detects pending) # Typically added to CI/CD pipeline, e.g., # npx merkel migrate
Debug
Known issues
gotchaPackage has not been updated since 2017; appears abandoned. No support for modern Node.js ESM, TypeScript, or major databases beyond minimal example.
fix
Consider actively maintained alternatives like `node-pg-migrate`, `db-migrate`, or `knex`.
affects: 0.1.3
gotchaUUID filenames can make ordering and debugging difficult; no built-in dry-run or sql validation.
fix
Use `--name` flag to provide meaningful names; test migrations manually before deploying.
affects: >=0.0.0
gotchaNo built-in database drivers; you must provide your own database connection inside migration files, which couples migrations to infrastructure.
fix
Create a shared db module and import it in all migrations.
affects: >=0.0.0
gotchaGit hook installation via `merkel init` is intrusive and may conflict with other pre-commit hooks.
fix
Consider skipping git hook and manually adding merkel to your CI/CD pipeline.
affects: >=0.0.0
Errors
Common errors & fixes
Error: Cannot find module 'merkel'
Missing local/global installation
fix
Install as devDependency: npm install --save-dev merkel, then use npx merkel
TypeError: exports.up is not a function
Incorrect export format in migration file
fix
Use `export function up()` or `module.exports = { up, down }` per CommonJS.
Upgrade
Version history
0.1.3latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
8
Resources
packagemerkel
merkel — npm install merkel · libregistry