此问题的答案https://stackoverflow.com/a/973785/1297371问题:How to set Sqlite3 to be case insensitive when string comparing? 讲述如何使用“COLLATE NOCASE”列创建表。如何在迁移表中创建“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?
大概这不是在sqlite3上(至少在2013年没有回来),只为人们搜索:http://stackoverflow.com/questions/37878967/sqlite3-on-rails-create-table-using -collate-NOCASE –