【发布时间】:2012-06-27 12:00:07
【问题描述】:
这个问题的答案https://stackoverflow.com/a/973785/1297371:How to set Sqlite3 to be case insensitive when string comparing? 告诉如何使用“COLLATE NOCASE”列创建表。
我的问题是如何在 Rails 迁移中创建这样的列? 即如何从
create table Test
(
Text_Value text collate nocase
);
create index Test_Text_Value_Index
on Test (Text_Value collate nocase);
做:
create_table :tests do
#WHAT HERE?
end
add_index #... WHAT HERE?
【问题讨论】:
标签: ruby-on-rails sqlite migration collation