Registry / database / coffee-db-migrate

coffee-db-migrate

JSON →
library0.1.2jsnpmunverified

An abstract migration framework for Node.js written in CoffeeScript that stores migration steps in a database. Version 0.1.2 is the latest stable release, with no recent updates. It is based on coffee-migrate but differs by persisting migrated file titles in the database. Requires manual implementation of database-specific methods (lock, release, getStoredMigrations, saveState, removeMigration) in a dbMigration.coffee file. This is a niche, unmaintained package with limited documentation and no active development; consider more robust alternatives like Knex.js or node-pg-migrate.

npm install coffee-db-migrate
INSTALL
IMPORT
SIG · COFFEE-DB-MIGRATE
C
coffee-db-migrate
databasejavascriptv0.1.2
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.

migrate (CLI)
npx migrate [options] [command]
require('coffee-db-migrate')
This package is a CLI tool and should be invoked via the command line, not imported programmatically.

Demonstrates installation, creating a migration file, implementing mandatory dbMigration.coffee methods, and running a migration with DB storage.

# Install globally npm install -g coffee-db-migrate # Create a migration directory and file mkdir migrations cd migrations migrate create my_migration # Then implement dbMigration.coffee in the migrations folder: # migrations/dbMigration.coffee exports.lockMigrationProcess = (next) -> next() exports.releaseMigration = (next) -> next() exports.getStoredMigrations = (next) -> next([]) exports.saveState = (title, status, next) -> next() exports.removeMigration = (title, next) -> next() # Run migration up with DB storage migrate up --db
Debug
Known issues
gotchaThe package is written in CoffeeScript and requires a dbMigration.coffee file; if you don't use CoffeeScript, you must compile or supply CoffeeScript files.
fix
Ensure your migrations folder contains a valid CoffeeScript file named dbMigration.coffee with the required exports.
affects: >=0
gotchaThe package is unmaintained and may have compatibility issues with modern Node.js versions.
fix
Consider using an actively maintained migration tool like Knex.js or node-pg-migrate.
affects: >=10
gotchaThe CLI flag --db is required to store migration steps in db; omitting it uses a file-based approach, but the README does not clarify behavior.
fix
Always use --db flag if you intend to use database storage.
affects: >=0
Errors
Common errors & fixes
Cannot find module 'coffee-db-migrate'
The package is installed globally but not in the local node_modules.
fix
Install globally: npm install -g coffee-db-migrate
ReferenceError: require is not defined in ESM
Package uses CommonJS and may not work in ES modules.
fix
Use CommonJS or convert to ES module with dynamic import.
Upgrade
Version history
0.1.2latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
8
Amazon
1
OpenAI (training)
1
Resources
coffee-db-migrate — npm install coffee-db-migrate · libregistry