How do you add uniqueness constraints to an already existing database backed web application?
We're continuing our look at adding integrity to an already existing database backed web application. In this screencast we will be adding a uniqueness constraint. This is one of the more difficult constraints to add to existing data as you must come up with a way to get rid of duplicates.
Active Record Migrations -- Ruby on Rails Guides