diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-06-22 01:14:07 -0700 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-06-22 01:14:07 -0700 |
commit | f4e2865d2fabf55bb017f7f88fa2ef0d1c3d4fad (patch) | |
tree | 957728c1ea3937f57d936e2c31426635af4402ca | |
parent | a962217db808616065a8160458fe6f4a084f7cd1 (diff) | |
parent | 43d2e7b1044ec5720f8a3d6e9cb3091d8d533dc4 (diff) | |
download | gitlab-ce-f4e2865d2fabf55bb017f7f88fa2ef0d1c3d4fad.tar.gz |
Merge pull request #3408 from NARKOZ/patch-2
add db index for authentication_token column in users table
-rw-r--r-- | db/migrate/20130326142630_add_index_to_users_authentication_token.rb | 5 | ||||
-rw-r--r-- | db/schema.rb | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/db/migrate/20130326142630_add_index_to_users_authentication_token.rb b/db/migrate/20130326142630_add_index_to_users_authentication_token.rb new file mode 100644 index 00000000000..d42ef113738 --- /dev/null +++ b/db/migrate/20130326142630_add_index_to_users_authentication_token.rb @@ -0,0 +1,5 @@ +class AddIndexToUsersAuthenticationToken < ActiveRecord::Migration + def change + add_index :users, :authentication_token, unique: true + end +end diff --git a/db/schema.rb b/db/schema.rb index c3c751e3a19..b755d555630 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20130614132337) do +ActiveRecord::Schema.define(:version => 20130326142630) do create_table "deploy_keys_projects", :force => true do |t| t.integer "deploy_key_id", :null => false @@ -298,6 +298,7 @@ ActiveRecord::Schema.define(:version => 20130614132337) do end add_index "users", ["admin"], :name => "index_users_on_admin" + add_index "users", ["authentication_token"], :name => "index_users_on_authentication_token", :unique => true add_index "users", ["email"], :name => "index_users_on_email", :unique => true add_index "users", ["extern_uid", "provider"], :name => "index_users_on_extern_uid_and_provider", :unique => true add_index "users", ["name"], :name => "index_users_on_name" |