Laravel migrations change a column type from varchar to longText

You can create a new migration and change just one column type:

public function up()
{
    Schema::table('sometable', function (Blueprint $table) {
        $table->text('text')->change();
    });
}

You need to install doctrine/dbal to make this work

composer require doctrine/dbal

Works with Laravel 5.0+. It does not work with Laravel 4.2.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)