Commit 7a9051e9 authored by Sean McGivern's avatar Sean McGivern

Add index to approvals.merge_request_id

parent 17e57b8b
---
title: Add index to approvals.merge_request_id
merge_request:
author:
class AddIndexToApprovalsMergeRequestId < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
add_concurrent_index :approvals, :merge_request_id
end
def down
remove_concurrent_index :approvals, :merge_request_id
end
end
......@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20170419065104) do
ActiveRecord::Schema.define(version: 20170421113144) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
......@@ -141,6 +141,8 @@ ActiveRecord::Schema.define(version: 20170419065104) do
t.datetime "updated_at"
end
add_index "approvals", ["merge_request_id"], name: "index_approvals_on_merge_request_id", using: :btree
create_table "approver_groups", force: :cascade do |t|
t.integer "target_id", null: false
t.string "target_type", null: false
......
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