Xethron / migrations-generator

Laravel Migrations Generator: Automatically generate your migrations from an existing database schema.
MIT License
3.32k stars 588 forks source link

Unknown database type "point" requested #152

Open aconital opened 6 years ago

aconital commented 6 years ago

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.

keremcankaya0 commented 6 years ago

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

keremcankaya0 commented 6 years ago

@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

aconital commented 6 years ago

@keremcankaya0 thanks will try

keremcankaya0 commented 6 years ago

@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

mramireza272 commented 4 years ago

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