Level 2
Doctrine doesn't support UUID fields and that's what you're using when you're running change().
1 like
Hi friends, I'm using uuids as id in application. I'm trying to change an uuid column to be nullable and i'm getting the following error:
[Doctrine\DBAL\DBALException]
Unknown column type "uuid" 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 w
ith \Doctrine\DBAL\Types\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#registerDoctrineTypeMapping() or have your custom types implement Type#getMappedDatabaseTypes(). If the type name is empty you might have a problem with th
e cache or forgot some mapping information.
here is my migration code:
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class SetAffiliateIdToNullableInTransactions extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('transactions', function (Blueprint $table) {
$table->uuid('affiliate_id')->nullable()->change();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('transactions', function (Blueprint $table) {
$table->uuid('affiliate_id')->change();
});
}
}
any help?
Doctrine doesn't support UUID fields and that's what you're using when you're running change().
Please or to participate in this conversation.