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

Spatial index detection in schema #198

Open
lowwa132 opened this issue Jan 24, 2019 · 5 comments
Open

Spatial index detection in schema #198

lowwa132 opened this issue Jan 24, 2019 · 5 comments

Comments

@lowwa132
Copy link

lowwa132 commented Jan 24, 2019

Each time I execute a schema update with --dump-sql SQL option, it gives me:

DROP INDEX IDX_4C416148DD30FFD8 ON geo_table;
CREATE SPATIAL INDEX IDX_4C416148DD30FFD8 ON geo_table (shape);

Even if I execute it with --force option, it always want to drop and recreate the index (with the same name).

I don't know what it's worth, but I remember I had this bug a year ago. It was not present anymore, and reappared after I did a composer update (doctrine/orm upgraded from 2.6.2 to 2.6.3).

@sela
Copy link

sela commented Feb 25, 2019

Did you try to create a new database and run all your migrations and then running again the schema update --dump-sql?

@lowwa132
Copy link
Author

I've just tried, same thing happening.

@echantigny
Copy link

I have the same issue here. Was this ever fixed or is there any workaround?

@sadortun
Copy link
Member

Hi @echantigny, if you still have the issue with master it's probably not fixed ;)

feel free to submit a PR if you find the issue.

@echantigny
Copy link

For anyone seeing this late, the solution for me was:
@ORM\Index(name="center_point", columns={"center_point"}, options={"flags"="spatial"})

I hope this helps out someone.

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

4 participants