This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

judeudemolidor
judeudemolidor

when i try create with Schema on October [Eloquent>Illuminate] the operator ENUM answer this message...

[Doctrine\DBAL\DBALException]
Unknown database type enum requested, Doctrine\DBAL\Platforms\MySqlPlatform m
ay not support it.

why i can't use ENUM if exists on Laravel Schema (https://laravel.com/docs/4.2/schema#dropping-columns) and on document of OctoberCMS (https://octobercms.com/docs/database/structure#creating-columns)

Obs> i try modify plugin Rainlab.User see code

engine = 'InnoDB';
            $table->increments('id');
            $table->string('name')->nullable();
            $table->string('email')->unique();
            $table->string('password');
            $table->string('formacao')->nullable();
            $table->enum('departamento', ['relacionamento','comercial','recepcao','pedagogico','ensino','Instituto','diretoria','te','pmo','produção','ti','rh','financeiro','compras','marketing']);
            //$table->string('departamento')->nullable();
            $table->string('cargo')->nullable();
            $table->string('funcao')->nullable();
            $table->string('data_nasc')->nullable();
            $table->string('data_admis')->nullable();
            $table->string('brev_hist_prof')->nullable();
            $table->string('linkedin')->nullable();
            $table->string('cv_lates')->nullable();
            $table->string('activation_code')->nullable()->index();
            $table->string('persist_code')->nullable();
            $table->string('reset_password_code')->nullable()->index();
            $table->text('permissions')->nullable();
            $table->boolean('is_activated')->default(0);
            $table->timestamp('activated_at')->nullable();
            $table->timestamp('last_login')->nullable();
            $table->timestamps();
        });
    }

    public function down()
    {
        Schema::dropIfExists('users');
    }
}

Last updated

Tschallacka
andrepo18380
andrepo18380
andrepo18380

If you, like me, got stuck with this error trying to change the column type that won't work no matter what. So just drop the column and recreate it using enum. If you can't loose the current table data, manage the enum in the Model and keep the column as string

Last updated

raokean34473
raokean34473

Hi! I have a problem:

"Unknown database type bit requested, Doctrine\DBAL\Platforms\MySqlPlatform may not support it." on line 423 of /var/www/barchino/data/www/roy.uz/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php

Help me, how to fix it?

1-5 of 5

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.