Skip to content

Commit

Permalink
Add migration to test
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Krail committed Oct 10, 2017
1 parent 6ac5936 commit b86609b
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules
.idea/
node_modules/
.DS_Store
npdfile.js
examples
23 changes: 23 additions & 0 deletions test/migrations/20150819155841_alter_test_table1_2.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
'use strict';

exports.up = function(migrator, config){
return migrator().updateTable('test_table1', function(t){
t.globalSecondaryIndexUpdates(function(t){
t.create('indexName4', function(t){
t.string('hash_key3').hashKey();
t.provisionedThroughput(5, 5);
t.projectionTypeAll();
});
});
}).then(function(){
return migrator().waitUntilTableActivate('test_table1');
});
};

exports.down = function(migrator, config){
return migrator().updateTable('test_table1', function(t){
t.globalSecondaryIndexUpdates(function(t){
t.delete('indexName4');
});
});
};

0 comments on commit b86609b

Please sign in to comment.