Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion dynamodb/migrations.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ var BbPromise = require('bluebird'),
var createTable = function(dynamodb, migration) {
return new BbPromise(function(resolve) {
dynamodb.raw.createTable(migration.Table, function(err) {
if (err) {
if (err && err.code === 'ResourceInUseException' ) {
// just print message if table already exists
console.log(err.message);
} else if (err) {
console.log(err);
} else {
console.log("Table creation completed for table: " + migration.Table.TableName);
Expand Down