Alter column length in Schema builder?

qwerty picture qwerty · Dec 10, 2012 · Viewed 11.3k times · Source

I have two fields i need to increment the character limit on. I're read through the documentation and to my surprise i found no option for it. Is it possible to do? If not, how should i go about solving this?

I could drop the column and re-create it with the correct properties, but i don't want to loose any data in the database.

Answer

ademers picture ademers · Jul 3, 2013

For Laravel 4

DB::update('ALTER TABLE `my_table` MODIFY `my_column` VARCHAR(<new length>)');