dynamodb-migrate 1.0.5
Install from the command line:
Learn more about npm packages
$ npm install @digitalspace/dynamodb-migrate@1.0.5
Install via package.json:
"@digitalspace/dynamodb-migrate": "1.0.5"
About this version
A simple DynamoDB database migration tool is included in the /dynamodb-migrate
directory. This tool can be used to create and apply data migration scripts.
Add the following to scripts:
"migration": "node ./node_modules/@digitalspace/dynamodb-migrate/migrate.js"
migration create
command can be used to generate a blank migration script. <migration-name>
is required.
npm run migration create <migration-name>
migration up
command can be used to apply new migrations to the target database. The default migration up
command will target local DynamoDB on port 8000. The port can be overriden with the DYNAMODB_ENDPOINT
env. See AWS DynamoDB remote endpoints to configure which region you want to target.
migration up remote
can be used to target remote AWS databases. This will require the proper AWS credentials in the environments.
# Targeting dynamodb-local
npm run migration up
# Targeting remote AWS DynamoDB
npm run migration up remote
You can configure the script by using environment variables. The following are the environment variables that the script is looking for:
- MIGRATIONS_DB_REGION
- MIGRATIONS_DB_ENDPOINT
- MIGRATIONS_TABLE_NAME
- MIGRATIONS_DIR
- MIGRATIONS_TEMPLATE
- DATE_FORMAT
Details
- dynamodb-migrate
- digitalspace
- over 1 year ago
- Apache-2.0
- 3 dependencies
Assets
- dynamodb-migrate-1.0.5.tgz
Download activity
- Total downloads 0
- Last 30 days 0
- Last week 0
- Today 0