KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a simple MySQL table with one column: name . I would like to define a unique constraint on this column. I can do: class MyModel < ActiveRecord::Base validates_uniqueness_of :my_column_name end but it will work only at the application level, not at the database level. What would you suggest ?
Tags (comma-separated)
Save Edits
Cancel