MariaDB 10.1 issues
Ezyweb-uk opened this issue · comments
Looks like a nice project!
Testing environment: Windows XAMPP Apache 2.4 Php 7.3 MariaDB 10.1
I had to update \app\Providers\AppServiceProvider.php
to get past a 'key was too long' error when running php artisan migrate --seed
:
Added at the top:
use Illuminate\Support\Facades\Schema;
and:
public function boot()
{
Schema::defaultStringLength(191);
}
Next error occurs at: Migrating: 2019_11_10_000001_create_media_table
An SQL syntax error near 'json not null, custom_properties
json not null, responsive_images
json not n'. Looks like MariaDB JSON Datatype is available from Version 10.2.7+. I replaced 'json' with 'text', deleted all database tables and re-ran artisan.
Ref: laravel/framework#13622 (comment)
Seems to be working now even with old MariaDB 10.1, which I should upgrade!
@Ezyweb-uk thanks for explaining the issue. We do use JSON field which appeared in MariaDB, from what I remember, in 10.2.7 version. So yes, please upgrade.