Skip to content

wdna-sistemas/dynamodb-migrator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DynamoDB-migrator

Create and run DynamoDB migrations easily.

Install with npm i -D dynamo-migrator

Add a create and a migrate script in your package.json file:

    {
        "scripts": {
            "create": "dynamo-migrator create",
            "migrate": "dynamo-migrator migrate"
        }
    }

Environment vars

MIGRATION_TABLE: Table name to keep migrations run. Defaults to _migrations.

MIGRATION_ATTRIBUTE: Table migration attribute. Defaults to migration_date.

MIGRATION_DIR: Directory name that holds all migration files. Defaults to migrations.

DYNAMO_ENDPOINT: Can point to a local DynamoDB instance by setting http://localhost:4569.


Commands flags

The migrate command accepts the -f/--force flag, to skip user confirmation when migrating