Skip to content

Commit

Permalink
fix: resolve issues with new synonymous for GeometryCollection type i…
Browse files Browse the repository at this point in the history
…n MySQL 8 (#8927)

As of mysql v8.0, new synonymous was introduced for "GeometryCollection" - "GeomCollection".
The preferred type name is "GeomCollection".
  • Loading branch information
davidsl4 committed Aug 24, 2022
1 parent 9f7fc14 commit 5ebc626
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/driver/mysql/MysqlQueryRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2559,6 +2559,11 @@ export class MysqlQueryRunner extends BaseQueryRunner implements QueryRunner {
tableColumn.name = dbColumn["COLUMN_NAME"]
tableColumn.type =
dbColumn["DATA_TYPE"].toLowerCase()
// sicne mysql 8.0, "geometrycollection" returned as "geomcollection"
// typeorm still use "geometrycollection"
if (tableColumn.type === "geomcollection") {
tableColumn.type = "geometrycollection"
}

tableColumn.zerofill =
dbColumn["COLUMN_TYPE"].indexOf("zerofill") !==
Expand Down

0 comments on commit 5ebc626

Please sign in to comment.