此問題的答案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 –