diff options
Diffstat (limited to 'db/migrate/20140304043654_add_index_to_users_user_name.rb')
-rw-r--r-- | db/migrate/20140304043654_add_index_to_users_user_name.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/db/migrate/20140304043654_add_index_to_users_user_name.rb b/db/migrate/20140304043654_add_index_to_users_user_name.rb index 724cca5..22ca8c3 100644 --- a/db/migrate/20140304043654_add_index_to_users_user_name.rb +++ b/db/migrate/20140304043654_add_index_to_users_user_name.rb @@ -1,4 +1,7 @@ class AddIndexToUsersUserName < ActiveRecord::Migration + +# ensures that the username is unique def change + add_index :users, :user_name, unique: true end end |