-
Notifications
You must be signed in to change notification settings - Fork 2.1k
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
table.index() not adding SPATIAL index for geometry column #2532
Comments
Which would be expected queries in this case? I suppose this one is not what you were expecting:
|
Uh, forgot it, my bad: |
Looks like a bug then 👍 Need to check out if that is broken in all dialects. |
@elhigu I was giving it a try, and found out this bug has nothing to do with SPATIAL indexes, It's actually a limitation of the knex api. http://knexjs.org/#Schema-index the docs actually say you can provide the index type:
But mysql dialects should also support the indexType for these use cases: https://github.com/tgriesser/knex/blob/ee8cc35ecb41a8bc809f753b56e64691bd3fa25c/src/dialects/mysql/schema/tablecompiler.js#L160 |
Any updates on this? |
@Frondor I'm sure you would have known if you have done anything about this :) I highly doubt that anyone else is going to fix it. |
Environment
Knex version: 0.14.4
Database + version: MariaDB 10.2
Issue
At creating geospatial columns, when creating the indexes, it does not create the
SPATIAL
index, plus gettingError: BLOB/TEXT column 'locations' used in key specification without a key length
, and as far as I know, you can't set a length to MULTIPOINTError:
The text was updated successfully, but these errors were encountered: