Spatial indexes
n-sviridenko opened this issue · 4 comments
n-sviridenko commented
I need to have an ability to create spatial indexes:
http://dev.mysql.com/doc/refman/5.7/en/creating-spatial-indexes.html
FredoVelcro-zz commented
👍 need this too like https://github.com/jsor/doctrine-postgis/ does...
sadortun commented
@FredoVelcro @n-sviridenko interested in contributing a PR?
svycka commented
not sure what does not work I added index int oentity annotation and doctrine/migrations generated correct migrations
* @ORM\Table(
* name="profiles",
* indexes={
* @ORM\Index(name="location_sp", columns={"location"}, flags={"spatial"})
* }
* )
and generated this:
$this->addSql('ALTER TABLE profiles ADD location POINT NOT NULL COMMENT \'(DC2Type:point)\'');
$this->addSql('CREATE SPATIAL INDEX location_sp ON profiles (location)');