修改Laravel中的表列时发生迁移问题

时间:2019-03-13 06:19:12

标签: laravel

为修改列长和类型,我运行了以下命令

我的列名是course_slot_idint(11),我想更改它varchar(100)

- composer require doctrine/dbal
- php artisan make:migration modify_course_slot_id_table --table=course_booking
- php artisan migrate

我的迁移

class ModifyCourseSlotIdTable extends Migration 
{ 
    public function up()
    { 
        Schema::table('course_booking', function (Blueprint $table) { 
            $table->string('course_slot_id', 100)->nullable()->change(); 
        }); 
    } 

    public function down()
    { 
        Schema::table('course_booking', function (Blueprint $table) {
            //...
        }); 
    } 
}

运行迁移命令时遇到以下问题

In AbstractPlatform.php line 434:
Unknown database type enum requested, Doctrine\DBAL\Platforms\MySQL57Platform may not support it.

0 个答案:

没有答案