migrations-generator icon indicating copy to clipboard operation
migrations-generator copied to clipboard

Unknown database type "point" requested

Open HiradRoshandel opened this issue 8 years ago • 5 comments

I have a column called "coordinates" and it has the type "point". The library is crashing

[Doctrine\DBAL\DBALException] Unknown database type point requested, Doctrine\DBAL\Platforms\MySQL57Platf orm may not support it.

HiradRoshandel avatar Oct 25 '17 16:10 HiradRoshandel

Same problem, @aconital have you managed to solve the issue?

keremcankaya0 avatar Dec 31 '17 15:12 keremcankaya0

@aconital I've solved the issue using laravel grimzy/laravel-mysql-spatial:^1.0 package. For Laravel 5.5 just use: composer require grimzy/laravel-mysql-spatial:^1.0 And regenerate migration, good to go

keremcankaya0 avatar Dec 31 '17 15:12 keremcankaya0

@keremcankaya0 thanks will try

HiradRoshandel avatar Dec 31 '17 18:12 HiradRoshandel

@aconital ah one last thing after you require the package and create the migrations, you'll see that the package is no longer throwing exception however still not using the correct field in the migration file. Just manually change that to according to your needs(poing, geometry etc) and try migration refresh, thats all

keremcankaya0 avatar Jan 01 '18 11:01 keremcankaya0

For Laravel 5.7 and postgresql: composer require phaza/laravel-postgis

mramireza272 avatar Dec 26 '19 17:12 mramireza272