diff --git a/src/umzug-postgres-storage.js b/src/umzug-postgres-storage.js index e9b8d7f..45e03a2 100644 --- a/src/umzug-postgres-storage.js +++ b/src/umzug-postgres-storage.js @@ -31,7 +31,7 @@ class UmzugPostgresStorage { ); `); - ret_p.then(function () { + ret_p.fin(function () { _o.done(); _o.pool.end(); }); @@ -45,7 +45,7 @@ class UmzugPostgresStorage { .then(function () { return this.dbConn().then(function (_o) { var query_p = _o.client.query(sql); - query_p.then(function () { + query_p.fin(function () { _o.done(); _o.pool.end(); }); @@ -93,4 +93,4 @@ class UmzugPostgresStorage { } -module.exports = UmzugPostgresStorage; \ No newline at end of file +module.exports = UmzugPostgresStorage;