laravellaravel-5database-migration

Changing column in Laravel migration causes exception: Changing columns for table requires Doctrine DBAL


I'm trying to change the max length of one of my columns in table reserves in one migration. The code looks like this:

public function up()
{
    //
    Schema::table('reserves', function($table){
        $table->string("mobile", 11)->change();
    });
}

But when running the migration via artisan, it throws an exception and says:

[RuntimeException] Changing columns for table "reserves" requires Doctrine DBAL; install "doctrine/dbal".

What is the problem and how can I solve it?


Solution

  • The problem was solved by executing the following command on the root directory of the framework:

    composer require doctrine/dbal