File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ export class PostgresParser extends BaseDatabaseParser {
121
121
this . connectionOptions . database ,
122
122
schemaName ,
123
123
tableName ,
124
- await this . getProperties ( tableName ) ,
124
+ await this . getProperties ( tableName , schemaName ) ,
125
125
) ;
126
126
127
127
return resourceMetadata ;
@@ -137,7 +137,7 @@ export class PostgresParser extends BaseDatabaseParser {
137
137
return resources . filter ( Boolean ) as ResourceMetadata [ ] ;
138
138
}
139
139
140
- public async getProperties ( table : string ) {
140
+ public async getProperties ( table : string , schemaName : string ) {
141
141
const query = this . knex
142
142
. from ( 'information_schema.columns as col' )
143
143
. select (
@@ -156,7 +156,7 @@ export class PostgresParser extends BaseDatabaseParser {
156
156
. on ( 'tco.constraint_name' , 'kcu.constraint_name' )
157
157
. on ( 'tco.constraint_schema' , 'kcu.constraint_schema' )
158
158
. onVal ( 'tco.constraint_type' , 'PRIMARY KEY' ) )
159
- . where ( 'col.table_schema' , 'public' )
159
+ . where ( 'col.table_schema' , schemaName )
160
160
. where ( 'col.table_name' , table ) ;
161
161
162
162
const columns = await query ;
You can’t perform that action at this time.
0 commit comments