Skip to content

Commit 4f7da68

Browse files
Merge pull request #36 from AshanFernando/master
Fixing the table prefix and suffix bug and updating dynamodb-migrations dependency version
2 parents af2f8c6 + dc96cdf commit 4f7da68

File tree

3 files changed

+8
-12
lines changed

3 files changed

+8
-12
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ e.g `"plugins": ["serverless-dynamodb-local"]`
4141
* Execute migration(s) in remote DynamoDB use additional parameters(region and stage) after execute/executeAll. e.g.
4242
`sls dynamodb executeAll -r us-west-1 -s dev`
4343

44-
Note: Read the detailed section for more information on advanced options and configurations
45-
Open a browser and go to the url http://localhost:8000/shell to access the web shell for dynamodb local
44+
Note: Read the detailed section for more information on advanced options and configurations. Open a browser and go to the url http://localhost:8000/shell to access the web shell for dynamodb local.
4645

4746
## Install: sls dynamodb install
4847
To remove the installed dynamodb local, run:
@@ -171,6 +170,9 @@ You need to add the following parameters to the AWS NODE SDK dynamodb constructo
171170

172171
e.g. for dynamodb document client sdk
173172
```
173+
var AWS = require('aws-sdk'),
174+
```
175+
```
174176
new AWS.DynamoDB.DocumentClient({
175177
region: 'localhost',
176178
endpoint: 'http://localhost:8000'

index.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,7 @@ module.exports = function (S) {
191191
let dynamodb = self.dynamodbOptions(options.stage, options.region),
192192
tableOptions = self.tableOptions();
193193
dynamodbMigrations.init(dynamodb, tableOptions.path);
194-
dynamodbMigrations.execute(options.name, {
195-
tablePrefix: tableOptions.prefix,
196-
tableSuffix: tableOptions.suffix
197-
}).then(resolve, reject);
194+
dynamodbMigrations.execute(options.name, tableOptions).then(resolve, reject);
198195
});
199196
}
200197

@@ -205,10 +202,7 @@ module.exports = function (S) {
205202
let dynamodb = self.dynamodbOptions(options.stage, options.region),
206203
tableOptions = self.tableOptions();
207204
dynamodbMigrations.init(dynamodb, tableOptions.path);
208-
dynamodbMigrations.executeAll({
209-
tablePrefix: tableOptions.prefix,
210-
tableSuffix: tableOptions.suffix
211-
}).then(resolve, reject);
205+
dynamodbMigrations.executeAll(tableOptions).then(resolve, reject);
212206
});
213207
}
214208

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "serverless-dynamodb-local",
3-
"version": "0.2.4",
3+
"version": "0.2.6",
44
"engines": {
55
"node": ">=4.0"
66
},
@@ -39,7 +39,7 @@
3939
"aws-sdk": "^2.3.19",
4040
"bluebird": "^3.0.6",
4141
"dynamodb-localhost": "0.0.2",
42-
"dynamodb-migrations": "0.0.7",
42+
"dynamodb-migrations": "0.0.8",
4343
"lodash": "^4.13.1",
4444
"mkdirp": "^0.5.0",
4545
"tar": "^2.0.0"

0 commit comments

Comments
 (0)