Commit cec958f0 authored by yguo's avatar yguo

Add index on invite-email to members

parent e6059b3d
---
title: Add index on invite_email for members
merge_request: 29428
author:
type: performance
# frozen_string_literal: true
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
class AddIndexToMembersInviteEmail < ActiveRecord::Migration[5.1]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
DOWNTIME = false
disable_ddl_transaction!
def up
add_concurrent_index :members, [:invite_email]
end
def down
remove_concurrent_index :members, [:invite_email]
end
end
...@@ -1848,6 +1848,7 @@ ActiveRecord::Schema.define(version: 20190611161641) do ...@@ -1848,6 +1848,7 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.boolean "ldap", default: false, null: false t.boolean "ldap", default: false, null: false
t.boolean "override", default: false, null: false t.boolean "override", default: false, null: false
t.index ["access_level"], name: "index_members_on_access_level", using: :btree t.index ["access_level"], name: "index_members_on_access_level", using: :btree
t.index ["invite_email"], name: "index_members_on_invite_email", using: :btree
t.index ["invite_token"], name: "index_members_on_invite_token", unique: true, using: :btree t.index ["invite_token"], name: "index_members_on_invite_token", unique: true, using: :btree
t.index ["requested_at"], name: "index_members_on_requested_at", using: :btree t.index ["requested_at"], name: "index_members_on_requested_at", using: :btree
t.index ["source_id", "source_type"], name: "index_members_on_source_id_and_source_type", using: :btree t.index ["source_id", "source_type"], name: "index_members_on_source_id_and_source_type", using: :btree
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment