Use PG current_database() instead of connection param

This commit is contained in:
rijkvanzanten
2020-11-10 17:53:41 -05:00
parent a08d47971b
commit 0c0f0e443c

View File

@@ -186,7 +186,7 @@ export default class Postgres implements Schema {
)
.from('information_schema.tables')
.whereIn('table_schema', this.explodedSchema)
.andWhere({ table_catalog: this.knex.client.database() })
.andWhereRaw(`"table_catalog" = current_database()`)
.andWhere({ table_type: 'BASE TABLE' })
.orderBy('table_name', 'asc');