Try changing to manipulatio_ns
PDOException::("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 t he right syntax to use near 'json not null, `custom_properties` json not n
hello this is my first post can anyone help me i got stuck...i am using spatie media library when i am going to migrate i am getting this error
PDO::prepare("create table media (id int unsigned not null auto_increment primary key, model_type varchar(191) not null, model_id char(36) not null, collection_name varch
ar(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, manipulatio ns 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) defau
lt character set utf8mb4 collate 'utf8mb4_unicode_ci'")
my migration file look like this
{
Schema::create('media', function (Blueprint $table) {
$table->increments('id');
$table->string('model_type');
$table->uuid('model_id');
$table->string('collection_name');
$table->string('name');
$table->string('file_name');
$table->string('mime_type')->nullable();
$table->string('disk');
$table->unsignedInteger('size');
$table->json('manipulations');
$table->json('custom_properties');
$table->json('responsive_images');
$table->unsignedInteger('order_column')->nullable();
$table->nullableTimestamps();
And read https://dev.mysql.com/doc/refman/8.0/en/json.html
And see MariaDB manual for exactly what's supported. Like is not null supported in your version. Check a bunch of this stuff on your own.
Please or to participate in this conversation.