Skip to content

Commit

Permalink
Merge be90b78 into b03cd13
Browse files Browse the repository at this point in the history
  • Loading branch information
myndzi committed Sep 2, 2014
2 parents b03cd13 + be90b78 commit ef2c307
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions lib/dialects/sqlite3/schema/ddl.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,17 @@ SQLite3_DDL.prototype.ensureTransaction = Promise.method(function() {
});

SQLite3_DDL.prototype.commitTransaction = Promise.method(function() {
return this.runner.commitTransaction();
if (this.runner.transaction) {
return this.runner.commitTransaction();
}
});

SQLite3_DDL.prototype.rollbackTransaction = function(e) {
return this.runner.rollbackTransaction().then(function() {
throw e;
});
if (this.runner.transaction) {
return this.runner.rollbackTransaction().then(function() {
throw e;
});
}
};

SQLite3_DDL.prototype.getTableSql = function() {
Expand Down

0 comments on commit ef2c307

Please sign in to comment.