Level 102
My guess is that your mysql does not support json. What Maria db version are you using? It must be over 10.2
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
*******************************************
* Migrate Rinvex Bookings Tables. *
*******************************************
Migrating: 2019_11_17_154305_create_bookable_bookings_table
Illuminate\Database\QueryException : 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 null, `notes` text null, `created_at` timestamp null, `updated_at` timestam' at line 1 (SQL: create table `bookable_bookings` (`id` int unsigned not null auto_increment primary key, `bookable_type` varchar(191) not null, `bookable_id` bigint unsigned not null, `customer_type` varchar(191) not null, `customer_id` bigint unsigned not null, `starts_at` datetime null, `ends_at` datetime null, `canceled_at` datetime null, `timezone` varchar(191) null, `price` decimal(8, 2) not null default '0.00', `quantity` int unsigned not null, `total_paid` decimal(8, 2) not null default '0.00', `currency` varchar(3) not null, `formula` text null, `options` json null, `notes` text null, `created_at` timestamp null, `updated_at` timestamp null, `deleted_at` timestamp null) default character set utf8mb4 collate 'utf8mb4_unicode_ci')
at C:\xampp\htdocs\sample\vendor\laravel\framework\src\Illuminate\Database\Connection.php:665
661| // If an exception occurs when attempting to run a query, we'll format the error
662| // message to include the bindings with SQL, which will make this exception a
663| // lot more helpful to the developer instead of just the database's errors.
664| catch (Exception $e) {
> 665| throw new QueryException(
666| $query, $this->prepareBindings($bindings), $e
667| );
668| }
669|
Exception trace:
1 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 the right syntax to use near 'json null, `notes` text null, `created_at` timestamp null, `updated_at` timestam' at line 1")
C:\xampp\htdocs\sample\vendor\laravel\framework\src\Illuminate\Database\Connection.php:453
2 PDO::prepare("create table `bookable_bookings` (`id` int unsigned not null auto_increment primary key, `bookable_type` varchar(191) not null, `bookable_id` bigint unsigned not null, `customer_type` varchar(191) not null, `customer_id` bigint unsigned not null, `starts_at` datetime null, `ends_at` datetime null, `canceled_at` datetime null, `timezone` varchar(191) null, `price` decimal(8, 2) not null default '0.00', `quantity` int unsigned not null, `total_paid` decimal(8, 2) not null default '0.00', `currency` varchar(3) not null, `formula` text null, `options` json null, `notes` text null, `created_at` timestamp null, `updated_at` timestamp null, `deleted_at` timestamp null) default character set utf8mb4 collate 'utf8mb4_unicode_ci'")
C:\xampp\htdocs\sample\vendor\laravel\framework\src\Illuminate\Database\Connection.php:453
Please use the argument -v to see more details.
Please or to participate in this conversation.