解决方法:

在迁移文件中up方法最上方加上下面这一行代码即可:

Schema::getConnection()->getDoctrineSchemaManager()->getDatabasePlatform()->registerDoctrineTypeMapping('enum', 'string');

例如:

public function up()
{
    Schema::getConnection()->getDoctrineSchemaManager()->getDatabasePlatform()->registerDoctrineTypeMapping('enum', 'string');
    Schema::table('medicines', function (Blueprint $table) {
        
    });
}

 

相关文章:

  • 2021-11-20
  • 2021-11-18
  • 2021-04-03
  • 2022-12-23
  • 2022-01-01
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-22
相关资源
相似解决方案