summaryrefslogtreecommitdiff
path: root/db/migrate/20140304043654_add_index_to_users_user_name.rb
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2014-03-03 23:40:51 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2014-03-03 23:40:51 -0500
commit9f246b9ec386ccb5e6665408d050cf71fc336283 (patch)
tree200208753b12ad269b7512da6c9278470584f159 /db/migrate/20140304043654_add_index_to_users_user_name.rb
parentb8ed86ee1276eba4df8a321e81de5d9570a32850 (diff)
parent11e4de6fd8235b1877b1725d53a98f017130c768 (diff)
Merge branch 'clean'
Conflicts: generate.sh
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.rb7
1 files changed, 7 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
new file mode 100644
index 0000000..22ca8c3
--- /dev/null
+++ b/db/migrate/20140304043654_add_index_to_users_user_name.rb
@@ -0,0 +1,7 @@
+class AddIndexToUsersUserName < ActiveRecord::Migration
+
+# ensures that the username is unique
+ def change
+ add_index :users, :user_name, unique: true
+ end
+end