I need to change with migration column type of $table->string(\'text\');
to a text type, I have tried to do that in few ways, but none of them worked. Is it poss
If you get following error using change()
Unknown database type enum requested, Doctrine\DBAL\Platforms\MySQL80Platform may not support it.
this means that exists some column (not necessarily changed one) in your table which has enum type. So instead using change()
you can use following function:
public function changeColumnType($table, $column, $newColumnType) {
DB::statement("ALTER TABLE $table CHANGE $column $column $newColumnType");
}
And use it like that: $this->changeColumnType('sometable','text','TEXT');