feat(mysql)!: disable legacy spatial support by default for MySQL#12083
feat(mysql)!: disable legacy spatial support by default for MySQL#12083pkuczynski merged 3 commits intomasterfrom
Conversation
Review Summary by QodoDisable legacy spatial support by default for MySQL
WalkthroughsDescription• Changed default legacySpatialSupport from true to false for MySQL • Aligns with MySQL 8.0+ standard-compliant spatial functions • Updated documentation and migration guide for users • Reorganized spatial test to functional test structure Diagramflowchart LR
A["MySQL Driver Config"] -->|"legacySpatialSupport: false"| B["Standard ST_GeomFromText/ST_AsText"]
C["Documentation"] -->|"Updated defaults"| D["Migration Guide"]
E["Test Structure"] -->|"Reorganized"| F["test/functional/spatial/mysql/"]
File Changes1. src/driver/mysql/MysqlDriver.ts
|
Deploying typeorm with
|
| Latest commit: |
c9e18e6
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://34595a57.typeorm.pages.dev |
| Branch Preview URL: | https://mysql-disable-legacy-spatial.typeorm.pages.dev |
commit: |
Code Review by Qodo
1. Aurora default is implicit
|
Code Review by Qodo
1. Aurora default is implicit
|
Code Review by Qodo
1. MariaDB default also flips
|
…y-spatial-support # Conflicts: # docs/docs/guides/8-migration-v1.md
Code Review by Qodo
1. Missing issue reference in test
|
Code Review by Qodo
1. Add old-MySQL warning
|
Change the default value of
legacySpatialSupportfromtruetofalsefor the MySQL driver. TypeORM now uses the standard-compliantST_GeomFromTextandST_AsTextspatial functions by default, which were introduced in MySQL 5.7 and are required by MySQL 8.0+ (the legacyGeomFromTextandAsTextfunctions were removed in MySQL 8.0).Users on MySQL 5.6 or earlier can restore the old behavior by setting
legacySpatialSupport: trueexplicitly.Also moves the spatial MySQL test from
test/github-issues/3702/totest/functional/spatial/mysql/to match the existing spatial test structure.Fixes #12008