phpmyAdminを使ってXAMPでjsonデータベースを作成しようとしていますが、mariaDBを使用していることがわかりましたが、xamp-control panel v3.2.2
にはmySQL on port 3306
が表示されています。でもmariaDB LaravelのJSONサポート
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,
content
json null,scripts
json null,deleted_at
timestamp null' at line 1 (SQL: create tablepages
(id
int unsigned not null auto_increment primary key,title
varchar(191) not null,slug
varchar(191) not null,styles
json null,content
json null,scripts
json null,deleted_at
timestamp null,created_at
timestamp null,updated_at
timestamp null) default character set utf8mb4 collate utf8mb4_unicode_ci)
:私は次のエラーを取得しています
Schema::connection('newPortal')->create('pages', function (Blueprint $table){
$table->increments('id');
$table->string('title');
$table->string('slug')->unique()->index();
$table->json('styles')->nullable();
$table->json('content')->nullable();
$table->json('scripts')->nullable();
$table->softDeletes();
$table->timestamps();
});
さて、これを実行中:私は次のように私が実行しようとしている私の移行で、データベースを作成するにはLaravel 5.4フレームワークを使用していますnullでない場合、同じエラーがスローされます。私はjson形式のデータを持っていますが、サポートされているバージョンをチェックし、ドキュメントごとにjson形式のサポートがバージョンMariaDB 10.0.16.
から始まり、私は使用しています。10.1.21-MariaDB
私を助けてください。
でLaravelするMariaDB JSONを追加しますので、MariaDBは、JSONデータ型の別名を持っているあなたは、データベースのGUIまたはREPLで、そのクエリを実行し、その後出て、クエリの各部分をコメントしたことがあります1行ずつ?それは、正確な問題が何であるかを明らかにするかもしれない – Spholt