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.
Installation
npm install dynamodb-migrations-tool --save
Usage
The following example demonstrate a minimal usage of the migrator:
const defaultMigrator = ; async { // checks migrations and run them if they are not already applied await defaultMigrator; console;};
Using example bellow you can create a migrator instance with a couple migratorOptions
:
const migratorFactory = ; const migrator = ; async { await migrator;};
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: DynamoDBDocumentClient // Custom DynamoDB migration table name, can be populated with stage and stuff. // Optional. Default value is `migrations`. migrationTable: String