SO dieser Code meine Migration istJSONB nicht in Laravel unterstützt
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class ChangeDataTemplateOfActionTableToJsonB extends Migration
{
public function __construct()
{
DB::getDoctrineSchemaManager()->getDatabasePlatform()->registerDoctrineTypeMapping('jsonb', 'string');
}
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
//
Schema::table('actions', function ($table) {
$table->jsonb('data_template')->change();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
}
Auch wenn ich die Lehre richtig bin Registrierung es diesem Fehler Würfen
ERROR
[Doctrine\DBAL\DBALException]
Unknown column type "jsonb" requested. Any Doctrine type that you use has to be registered with \Doctrine\DBAL\Types\Type::addType(). You can get a list of all the known types with \Doctrine\DBAL\Typ
es\Type::getTypesMap(). If this error occurs during database introspection then you might have forgot to register all database types for a Doctrine Type. Use AbstractPlatform#registerDoctrineTypeMapp
ing() or have your custom types implement Type#getMappedDatabaseTypes(). If the type name is empty you might have a problem with the cache or forgot some mapping information.
https://meta.stackoverflow.com/questions/303812/discourage-screenshots-of-code-and-or-errors –
@AlexBlex in Ordnung – Vikram