-
Notifications
You must be signed in to change notification settings - Fork 3
php artisan migrate : SQLSTATE[42000]: Syntax error or access violation #23
Comments
Install him and then php artisan vendor:publish then migrate |
What version of MariaDB are you using? The project uses the json field type in migrations. MariaDB has introduced support for this type of field since version 10.2.3. |
@almohajire MariaDB 10.1.34 version is not supported JSON field types. This package using
|
ok tnx |
c:\xampp\htdocs\laravel>php artisan migrate
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,
response
json null,created_at
timestamp null,updated_at
times' at line 1 (SQL: create tablevk_requests
(id
int unsigned not null auto_increment primary key,user_id
int null,method
varchar(191) not null,request
json null,response
json 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\laravel\vendor\laravel\framework\src\Illuminate\Database\Connection.php:664
660| // If an exception occurs when attempting to run a query, we'll format the error
661| // message to include the bindings with SQL, which will make this exception a
662| // lot more helpful to the developer instead of just the database's errors.
663| catch (Exception $e) {
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,
response
json null,created_at
timestamp null,updated_at
times' at line 1")C:\xampp\htdocs\laravel\vendor\laravel\framework\src\Illuminate\Database\Connection.php:452
2 PDO::prepare("create table
vk_requests
(id
int unsigned not null auto_increment primary key,user_id
int null,method
varchar(191) not null,request
json null,response
json null,created_at
timestamp null,updated_at
timestamp null,deleted_at
timestamp null) default character set utf8mb4 collate 'utf8mb4_unicode_ci'")C:\xampp\htdocs\laravel\vendor\laravel\framework\src\Illuminate\Database\Connection.php:452
Please use the argument -v to see more details.
The text was updated successfully, but these errors were encountered: