Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot Run migration:generate with geo columns, Regression from PR #5525 #5613

Closed
krazibit opened this issue Mar 4, 2020 · 1 comment
Closed

Comments

@krazibit
Copy link

krazibit commented Mar 4, 2020

Issue type:

[ ] question
[x] bug report
[ ] feature request
[ ] documentation issue

Database system/driver:

[ ] cordova
[ ] mongodb
[ ] mssql
[ ] mysql / mariadb
[ ] oracle
[x] postgres
[ ] cockroachdb
[ ] sqlite
[ ] sqljs
[ ] react-native
[ ] expo

TypeORM version:

[ ] latest
[ ] @next
[x] 0.2.24 (or put your version here)

Steps to reproduce or a small repository showing the problem:

run migration:generate with entities that have geo column.

Fix in #5525 created a new issue.
The new clause added AND "table_name" = '${table.name}'
But table.name includes the schema name as prefix making the query return no result

Causing error Cannot read property ‘type’ of undefined on second line below

 const results: ObjectLiteral[] = await this.query(geographyColumnSql);
  tableColumn.spatialFeatureType = results[0].type;
  tableColumn.srid = results[0].srid;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant