Skip to content

Commit

Permalink
close postgres db connection if database already exist
Browse files Browse the repository at this point in the history
  • Loading branch information
tada5hi committed May 4, 2022
1 parent c1a463c commit 1eca591
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/database/driver/postgres.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ export async function createPostgresDatabase(
Array.isArray(existResult.rows) &&
existResult.rows.length > 0
) {
await connection.end();

return Promise.resolve();
}
}
Expand Down

0 comments on commit 1eca591

Please sign in to comment.