Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add unique index on DB level for fields where the model has :validates_uniqueness_of ... #191
Due to possible races which can happen for MarkUs installs having several clustered mongrels Rails' :validates_uniqueness_of is not enough. We also need unique indexes on DB level to alleviate this. More information here:
We need to go over our models and add those indexes where appropriate.
added a commit
Jun 11, 2013
There is an error in what I've done, MySQL produces an error referenced here: http://stackoverflow.com/questions/1827063/mysql-error-key-specification-without-a-key-length
Sorry, I only checked on SQLite.
Is it better to remove this index or edit the data type