请教,Laravel 4.2 的数据迁移里建索引怎么给 varchar 类型指定索引长度
请懂的人帮忙讲一下。
之前已经建过表了,现在想单独添加索引,代码如下,运行migrate报错
Schema::table('user', function($table){
$table->unique(array('id', 'username(20)'));
});
推荐文章: