欢迎各位兄弟 发布技术文章

这里的技术是共享的

修改一个列的类型 有大用

public function up(){
    DB::statement('ALTER TABLE items MODIFY COLUMN item_description TEXT');
    DB::statement('ALTER TABLE items MODIFY COLUMN delivery_description TEXT');
}

public function down(){
    DB::statement('ALTER TABLE items MODIFY COLUMN item_description VARCHAR(255)');
    DB::statement('ALTER TABLE items MODIFY COLUMN delivery_description VARCHAR(255)');
} 

来自 http://stackoverflow.com/questions/22060398/how-do-i-change-a-column-type-with-laravel-schema-builder

http://laravel.io/forum/04-07-2014-changing-the-length-of-a-column-using-migrations
唯物品评历史

关注"唯物品评历史",跟着泪痕春雨先生,读懂历史,看彻人生

打开隐藏二维码