Skip to content

Commit 327144a

Browse files
igoraguiarIgor Aguiar Rodrigues
andauthored
fix: wrong table name parameter when not using default schema (#5801)
* Fix wrong table name parameter when not using default schema * Fix linting issue Co-authored-by: Igor Aguiar Rodrigues <igor@devix.co>
1 parent 416e419 commit 327144a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/driver/postgres/PostgresQueryRunner.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1501,7 +1501,7 @@ export class PostgresQueryRunner extends BaseQueryRunner implements QueryRunner
15011501
"type"
15021502
FROM "geometry_columns"
15031503
) AS _
1504-
WHERE (${tablesCondition}) AND "column_name" = '${tableColumn.name}' AND "table_name" = '${table.name}'`;
1504+
WHERE (${tablesCondition}) AND "column_name" = '${tableColumn.name}' AND "table_name" = '${dbTable["table_name"]}'`;
15051505

15061506
const results: ObjectLiteral[] = await this.query(geometryColumnSql);
15071507
tableColumn.spatialFeatureType = results[0].type;
@@ -1518,7 +1518,7 @@ export class PostgresQueryRunner extends BaseQueryRunner implements QueryRunner
15181518
"type"
15191519
FROM "geography_columns"
15201520
) AS _
1521-
WHERE (${tablesCondition}) AND "column_name" = '${tableColumn.name}' AND "table_name" = '${table.name}'`;
1521+
WHERE (${tablesCondition}) AND "column_name" = '${tableColumn.name}' AND "table_name" = '${dbTable["table_name"]}'`;
15221522

15231523
const results: ObjectLiteral[] = await this.query(geographyColumnSql);
15241524
tableColumn.spatialFeatureType = results[0].type;

0 commit comments

Comments
 (0)