KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I need to create a case-insensitive index on a column in rails. I did this via SQL: execute( "CREATE UNIQUE INDEX index_users_on_lower_email_index ON users (lower(email))" ) This works great, but in my schema.rb file I have: add_index "users", [nil], :name => "index_users_on_lower_email_index", :unique => true Notice the "nil". So when I try to clone the database to run a test, I get an obvious error. Am I doing something wrong here? Is there some other convention that I should be using inside rails? Thanks for the help.
Tags (comma-separated)
Save Edits
Cancel