当我尝试应用我的迁移时,我收到此错误:
[Doctrine\DBAL\DBALException]
UnkNown database type enum requested, Doctrine\DBAL\Platforms\MysqL57Platform may not support it.
应用迁移,在数据库上创建枚举列,我得到错误,因此我无法执行nexts迁移,因为此迁移会抛出此错误.
在服务器中,我的MysqL版本为5.7.17
这是我的迁移代码:
class AddDocumentUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('users', function (Blueprint $table) {
$table->string('document', 9)->unique();
$table->enum('document_type', ['dni', 'nie', 'nif', 'cif']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('document');
$table->dropColumn('document_type');
});
}
}
谢谢