I'm creating an API for POIs and use the POINT-Type to store the coordinates.
As my company uses CakePHP I have to write a migration-script with Phinx.
But I don't have any Idea how to correctly create a column with the POINT-Type.
Sure, I just could make an "ALTER TABLE ..." in a handwritten Query, but maybe there is a better way?
Versions:
- Cake: 3.4.7
- Phinx: 0.6.5
- MySQL: 5.7.18
Just use "point" as you would use any other datatype as the second parameter of addColumn(). It's just not documented yet.
Credits for this solution are going to @ndm; I just think it's worth putting this as answer instead as a comment.