The standard solution didn't work for me, when changing the type from TEXT to LONGTEXT.
I had to it like this:
public function up()
{
DB::statement('ALTER TABLE mytable MODIFY mycolumn LONGTEXT;');
}
public function down()
{
DB::statement('ALTER TABLE mytable MODIFY mycolumn TEXT;');
}
This could be a Doctrine issue. More information here.
Another way to do it is to use the string() method, and set the value to the text type max length:
Schema::table('mytable', function ($table) {
// Will set the type to LONGTEXT.
$table->string('mycolumn', 4294967295)->change();
});