Registry / database / dynograte-v2

dynograte-v2

JSON →
library2.2.5jsnpmunverified

A Node.js DynamoDB migration tool (v2.2.5) that tracks applied migrations in a DynamoDB table and supports directory-based or function-based migrations, retry logic via the tri module, and a CLI for generating migration files. Extended from the original dynograte package, it offers retry configurations and automatic retry on failure. Release cadence is sporadic; last update 2019. Differentiators include lightweight design and DynamoDB-native tracking.

npm install dynograte-v2
INSTALL
IMPORT
SIG · DYNOGRATE-V2
D
dynograte-v2
databasejavascriptv2.2.5
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.

dynograte
import dynograte from 'dynograte-v2'
const dynograte = require('dynograte-v2')
ESM default import
migrate
import { migrate } from 'dynograte-v2'
const migrate = require('dynograte-v2').migrate
Named export, available from v2.0.0
create (CLI)
dynograte create --dir ... --migration ...
CLI command, not an import. Use after global install.

Shows how to run migrations from a directory using Dynograte-V2.

import dynograte from 'dynograte-v2'; import AWS from 'aws-sdk'; const dynamodb = new AWS.DynamoDB({ region: 'us-east-1' }); const result = await dynograte.migrate({ dynamodb: dynamodb, migrationTableName: 'my-migrations', migrationDir: './migrations' }); console.log('Migrations applied:', result);
Debug
Known issues
breakingDynograte-V2 is a fork of dynograte v1; API may differ. Check migration from v1.
fix
Use dynograte-v2 with updated import paths and method signatures.
affects: <2.0.0
deprecatedRetry feature relies on tri module, which is no longer actively maintained.
fix
Consider implementing custom retry logic or switch to another migration tool.
affects: >=2.0.0
gotchaMigration files must export an `up` function; missing export causes silent skip.
fix
Ensure each migration file has exports.up = (dynamodb) => { ... };
affects: >=2.0.0
Errors
Common errors & fixes
Cannot find module 'dynograte-v2'
Package not installed or typo in package name.
fix
Run: npm install dynograte-v2
dynograte.migrate is not a function
Using incorrect import pattern (e.g., default import vs named import).
fix
Use default import: import dynograte from 'dynograte-v2'
Retry parameter is not being used
Retry configuration not exported correctly in migration file.
fix
Export retry as true or an object: exports.retry = { maxAttempts: 3 };
Upgrade
Version history
2.2.5latest on npm
Audit
Dependencies
trioptionalUsed for retry logic in migrations
Agent activity
14 hits · last 30 days
node
12
Amazon
1
Resources
dynograte-v2 — npm install dynograte-v2 · libregistry