Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 Mysql 数据库中有一个表,我想在其上使用多列索引。如何使用 mysql 控制台在 Rails 中执行此操作?
在迁移定义中,您可以这样做:
add_index :table_name, [:column1, :column2]