Skip to content

Commit

Permalink
DEV: bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael O'Brien committed Jul 27, 2021
1 parent 5b257b1 commit 1679f2b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "onetable-migrate",
"version": "1.0.3",
"version": "1.0.4",
"description": "DynamoDB OneTable Migration Library",
"main": "dist/cjs/index.js",
"module": "dist/mjs/index.js",
Expand Down
7 changes: 6 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,19 @@ export class Migrate {
await migration.down(this.db, this)
await this.Migration.remove({version: migration.version})
} else {
// Repeat and up
await migration.up(this.db, this)
let params = {
version,
date: new Date(),
path: migration.path,
description: migration.description,
}
await this.Migration.create(params)
if (direction == 1) {
await this.Migration.create(params)
} else {
await this.Migration.update(params)
}
}
}
return migration
Expand Down

0 comments on commit 1679f2b

Please sign in to comment.