diff --git a/.gitignore b/.gitignore index 15b2fbf..fa5f753 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ -node_modules +.idea/ +node_modules/ .DS_Store npdfile.js examples diff --git a/test/migrations/20150819155841_alter_test_table1_2.js b/test/migrations/20150819155841_alter_test_table1_2.js new file mode 100644 index 0000000..c77c5f9 --- /dev/null +++ b/test/migrations/20150819155841_alter_test_table1_2.js @@ -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'); + }); + }); +};