diff options
author | Rémy Coutable <remy@rymai.me> | 2016-06-15 16:51:11 +0200 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-06-15 16:56:26 +0200 |
commit | b4ed272da9a466ffc003d2918bc24c173a4d43ee (patch) | |
tree | 067b105806eae0cc2012e8c8e14e6acf9b4d937d /db | |
parent | 8bfbafbb6b2166d3709187cf6b1cb7ff5f627d52 (diff) | |
download | gitlab-ce-b4ed272da9a466ffc003d2918bc24c173a4d43ee.tar.gz |
Add index on `requested_at` to the `members` tableadd-index-on-requested_at-to-members
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20160615142710_add_index_on_requested_at_to_members.rb | 9 | ||||
-rw-r--r-- | db/schema.rb | 3 |
2 files changed, 11 insertions, 1 deletions
diff --git a/db/migrate/20160615142710_add_index_on_requested_at_to_members.rb b/db/migrate/20160615142710_add_index_on_requested_at_to_members.rb new file mode 100644 index 00000000000..63f7392e54f --- /dev/null +++ b/db/migrate/20160615142710_add_index_on_requested_at_to_members.rb @@ -0,0 +1,9 @@ +class AddIndexOnRequestedAtToMembers < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + disable_ddl_transaction! + + def change + add_concurrent_index :members, :requested_at + end +end diff --git a/db/schema.rb b/db/schema.rb index e148a3c975d..6a3be7297e3 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20160610301627) do +ActiveRecord::Schema.define(version: 20160615142710) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -572,6 +572,7 @@ ActiveRecord::Schema.define(version: 20160610301627) do add_index "members", ["access_level"], name: "index_members_on_access_level", using: :btree add_index "members", ["created_at", "id"], name: "index_members_on_created_at_and_id", using: :btree add_index "members", ["invite_token"], name: "index_members_on_invite_token", unique: true, using: :btree + add_index "members", ["requested_at"], name: "index_members_on_requested_at", using: :btree add_index "members", ["source_id", "source_type"], name: "index_members_on_source_id_and_source_type", using: :btree add_index "members", ["type"], name: "index_members_on_type", using: :btree add_index "members", ["user_id"], name: "index_members_on_user_id", using: :btree |