I'm actually working on some migrations so I could test this easily. I was able to change a string to longText using ->nullable()->change(). Did you require dbal?
I think altering the table directly is fine and probably what most people would do. However, as you may know, there are some gotchas when you you want to do this on a table with a lot of data in production--mainly that it can take forever. See for example how one might speed it up: http://dba.stackexchange.com/questions/9746/mysql-fastest-way-to-alter-table-for-innodb
NP. Not sure what's going with your set up. For fun, I also seeded with 100,000 records then changed just to ensure it was working with a decent amount of data. Other than taking a minute or two, it was fine. I didn't want to leave this thread without being a little more thorough and I always feel like an answer of "works for me" is pretty unsatisfying. Sorry.
Ran into the same problem, a quick hack is to change it first to string, then to mediumText after (assuming it's originally in a text-ish format before).
You can do this in the same migration file and rollback the same way, works!
So no need to tinker on a production instance. Rollback works fine as:
public function down()
{
DB::statement('ALTER TABLE tabel_name CHANGE column_name column_name TEXT;');
}
This only works for mysql databases. SQLite does not support column type changing (which means phpunit tests won't like it) and postgreSQL uses a different syntax.
You can use config('database.default') to determine the database type for each environment.