如何使用 rails 3
为 MySQL 列创建索引?
根据 this
When you index a BLOB or TEXT column, you must specify a prefix length for the index.
如何使用 Rails 3 实现同样的效果
最佳答案
在迁移中你可以做:
add_index(:table_name, :column_name, :length => 10)
关于mysql - 如何使用 rails 3 为 mysql TEXT 列创建索引?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8678520/