I am trying to change a field in my users table to a varchar of 200. Currently it is 60 and not long enough. I tried using ->change() but because the table has an enum I get an error Unknown database type enum requested, Doctrine\DBAL\Platforms\MySQL57Platform may not support it.
As a result I am trying to change the column using a raw sql statement.
Here is the line I am trying to use.
DB::statement('ALTER TABLE users CHANGE COLUMN subrole VARCHAR(200)');
When I try this I get an error
[Illuminate\Database\QueryException]
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the
right syntax to use near 'VARCHAR(200)' at line 1 (SQL: ALTER TABLE users CHANGE COLUMN subrole VARCHAR(200))
What do I need to change? I am trying to change the column of subrole to size varchar 200.