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]
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]
上一篇:沙宣卷发棒多少钱啊??
丁香小鱼的做法?:下一篇
精彩评论