开发者

Index Multiple Columns w/ Ruby on Rails

I have a table in a Mysql db that I want to use multicolumn indexing on. How can I do t开发者_如何学运维his in rails w/o using the mysql console?


Inside a migration definition you can do it like this:

add_index :table_name, [:column1, :column2]

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜