Skip to content

Commit

Permalink
Using provided schema if present
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobcvetko authored and dziraf committed Jul 4, 2024
1 parent 4ac9afd commit 6a8e85e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/dialects/postgres.parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ export class PostgresParser extends BaseDatabaseParser {
}

public async getSchema() {
if (this.connectionOptions.schema) {
return this.connectionOptions.schema;
}
const query = await this.knex.raw('SELECT current_schema() AS schema_name');
const result = await query;

Expand Down

0 comments on commit 6a8e85e

Please sign in to comment.