vanilophp/demo

php artisan migrate: seed givining me error in command line

Closed this issue · 2 comments

Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'json not null, custom_properties json not null, responsive_images json not n' at line 1 (SQL: create table media (id int unsigned not null auto_increment primary key, model_type varchar(191) not null, model_id bigint unsigned not null, collection_name varchar(191) not null, name varchar(191) not null, file_name varchar(191) not null, mime_type varchar(191) null, disk varchar(191) not null, size int unsigned not null, manipulations json not null, custom_properties json not null, responsive_images json not null, order_column int unsigned null, created_at timestamp null, updated_at timestamp null) default character set utf8mb4 collate 'utf8mb4_unicode_ci') {"exception":"[object] (Illuminate\Database\QueryException(code: 42000): SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'json not null, custom_properties json not null, responsive_images json not n' at line 1 (SQL: create table media (id int unsigned not null auto_increment primary key, model_type varchar(191) not null, model_id bigint unsigned not null, collection_name varchar(191) not null, name varchar(191) not null, file_name varchar(191) not null, mime_type varchar(191) null, disk varchar(191) not null, size int unsigned not null, manipulations json not null, custom_properties json not null, responsive_images json not null, order_column int unsigned null, created_at timestamp null, updated_at timestamp null) default character set utf8mb4 collate 'utf8mb4_unicode_ci') at C:\xampp\htdocs\vanilo\vendor\laravel\framework\src\Illuminate\Database\Connection.php:664, Doctrine\DBAL\Driver\PDOException(code: 42000): SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'json not null, custom_properties json not null, responsive_images json not n' at line 1 at C:\xampp\htdocs\vanilo\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDOConnection.php:63, PDOException(code: 42000):

You need to have a DB engine that supports json fields:

  • MySQL 5.7 or higher,
  • MariaDB 10.2.7 or higher,
  • PostgreSQL 9.2 or higher.

Duplicate of #9 and #16

Okay, updated to mariaDB 10.2. something. It worked.
Thanks