Commit 0af48e12 authored by Sean McGivern's avatar Sean McGivern

Restore index on services.type

parent 73a2fe52
# 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 AddServicesTypeIndex < ActiveRecord::Migration[5.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
add_concurrent_index :services, :type unless index_exists?(:services, :type)
end
def down
remove_concurrent_index :services, :type if index_exists?(:services, :type)
end
end
...@@ -1967,6 +1967,7 @@ ActiveRecord::Schema.define(version: 20190312071108) do ...@@ -1967,6 +1967,7 @@ ActiveRecord::Schema.define(version: 20190312071108) do
t.boolean "confidential_note_events", default: true t.boolean "confidential_note_events", default: true
t.index ["project_id"], name: "index_services_on_project_id", using: :btree t.index ["project_id"], name: "index_services_on_project_id", using: :btree
t.index ["template"], name: "index_services_on_template", using: :btree t.index ["template"], name: "index_services_on_template", using: :btree
t.index ["type"], name: "index_services_on_type", using: :btree
end end
create_table "shards", force: :cascade do |t| create_table "shards", force: :cascade do |t|
......
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