From a016b3c5d92eeacd8e996d579e03ba3a9f580c01 Mon Sep 17 00:00:00 2001 From: Jakob Cvetko Date: Thu, 4 Jul 2024 21:15:49 +0200 Subject: [PATCH] Using provided schema if present --- src/dialects/postgres.parser.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/dialects/postgres.parser.ts b/src/dialects/postgres.parser.ts index f371684..90f3026 100644 --- a/src/dialects/postgres.parser.ts +++ b/src/dialects/postgres.parser.ts @@ -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;