igaster/laravel_cities

mariadb 10.0 can't migrate JSON

Closed this issue · 2 comments

Can you wrap json type in the migrations in a try-catch, so it would gracefully use text type on older MySQL?

You are right, some db engines don't support json type.

You can always create the geo table yourself and use a text field. Then even if you run the migrations it will not recreate the table (but the migration will be marked as completed)

Copy scheme from the provided migration: https://github.com/igaster/laravel_cities/blob/master/src/migrations/2017_02_13_090952_geo.php

Probably I could switch this a normal text field since we don't use any json functions from mysql...

Fixed!