zooniverse/Panoptes — pull request #95 by camallen (2014-07-04 16:59:36+00:00)
Title: Remove uri names model

Replaced URI_Name model with a PORO to check the uniqueness of the user#login and user_groups#display_name fields.

The uniqueness comparison query compares lower case strings with custom functional indexes via 'lower(login)' & 'lower(display_name)'. This means that the migration SQL index creation doesn't update the schema.rb file. We should think about moving to an sql format for the schema file to capture migrations like this.

Also if there are ever two non-unique records between these two models the Uniqueness checker will raise an error. I haven't caught this error but it should be handled somewhere. This raises the question about error tracking in the API, exceptional vs airbrake, etc.