diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-20 03:09:12 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-20 03:09:12 +0000 |
commit | d2b53bd7227495c615c865825f01a7fd7b9df9e0 (patch) | |
tree | b16a1749a6d5c198ef52abceb0360610d7c32260 /db | |
parent | b060b8b7e4e895e28226b366b92081512225cd14 (diff) | |
download | gitlab-ce-d2b53bd7227495c615c865825f01a7fd7b9df9e0.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20200319203901_add_index_on_users_unlock_token.rb | 18 | ||||
-rw-r--r-- | db/schema.rb | 3 |
2 files changed, 20 insertions, 1 deletions
diff --git a/db/migrate/20200319203901_add_index_on_users_unlock_token.rb b/db/migrate/20200319203901_add_index_on_users_unlock_token.rb new file mode 100644 index 00000000000..931e685f3fe --- /dev/null +++ b/db/migrate/20200319203901_add_index_on_users_unlock_token.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +class AddIndexOnUsersUnlockToken < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + INDEX_NAME = 'index_users_on_unlock_token' + + disable_ddl_transaction! + + def up + add_concurrent_index :users, :unlock_token, unique: true, name: INDEX_NAME + end + + def down + remove_concurrent_index :users, :unlock_token, unique: true, name: INDEX_NAME + end +end diff --git a/db/schema.rb b/db/schema.rb index ba3c1985593..4fd4d839b31 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2020_03_18_152134) do +ActiveRecord::Schema.define(version: 2020_03_19_203901) do # These are extensions that must be enabled in order to support this database enable_extension "pg_trgm" @@ -4441,6 +4441,7 @@ ActiveRecord::Schema.define(version: 2020_03_18_152134) do t.index ["state"], name: "index_users_on_state" t.index ["static_object_token"], name: "index_users_on_static_object_token", unique: true t.index ["unconfirmed_email"], name: "index_users_on_unconfirmed_email", where: "(unconfirmed_email IS NOT NULL)" + t.index ["unlock_token"], name: "index_users_on_unlock_token", unique: true t.index ["user_type"], name: "index_users_on_user_type" t.index ["username"], name: "index_users_on_username" t.index ["username"], name: "index_users_on_username_trigram", opclass: :gin_trgm_ops, using: :gin |