🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

dynamodb-migrations-tool

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dynamodb-migrations-tool

The *dynamodb-migrations-tool* is a DynamoDB storage based migrator implemented on top of the relyable and well tested framework agnostic migration tool **[umzug](https://github.com/sequelize/umzug)**.

1.1.0
latest
Source
npm
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

dynamodb-migrations-tool Build Status Coverage Status npm version

The dynamodb-migrations-tool is a DynamoDB storage based migrator implemented on top of the relyable and well tested framework agnostic migration tool umzug.

Installation

npm install dynamodb-migrations-tool --save

Usage

The following example demonstrate a minimal usage of the migrator:

const {defaultMigrator} = require('dynamodb-migrations-tool');

(async () => {
  // checks migrations and run them if they are not already applied
  await defaultMigrator.up();
  console.log('All migrations performed successfully');
})();

Using example bellow you can create a migrator instance with a couple migratorOptions:

const {migratorFactory} = require('dynamodb-migrations-tool');

const migrator = migratorFactory({
  migrationTable: 'migrations' // default
});

(async () => {
  await migrator.up();
})();

Migrator Options

The possible migratorOptions are:

{
  // The configured DynamoDB DocumentClient instance from aws-sdk.
  // Optional. If omited it will be created with default aws-sdk config.
  dynamodb: DynamoDB.DocumentClient,

  // Custom DynamoDB migration table name, can be populated with stage and stuff.
  // Optional. Default value is `migrations`.
  migrationTable: String,
}

Keywords

umzug

FAQs

Package last updated on 24 Mar 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts