Skip to content
Snippets Groups Projects
Commit 3ed555f3 authored by Thong Kuah's avatar Thong Kuah :speech_balloon:
Browse files

Remove redundant index

Now we have cluster_id, state index, we don't the cluster_id index as
well.
parent 1dec7480
No related branches found
No related tags found
No related merge requests found
# frozen_string_literal: true
class RemoveRedundantDeploymentsIndex < ActiveRecord::Migration[5.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
DOWNTIME = false
disable_ddl_transaction!
def up
remove_concurrent_index :deployments, :cluster_id
end
def down
add_concurrent_index :deployments, :cluster_id
end
end
Loading
Loading
@@ -1147,7 +1147,6 @@ ActiveRecord::Schema.define(version: 2019_08_28_083843) do
t.datetime_with_timezone "finished_at"
t.integer "cluster_id"
t.index ["cluster_id", "status"], name: "index_deployments_on_cluster_id_and_status"
t.index ["cluster_id"], name: "index_deployments_on_cluster_id"
t.index ["created_at"], name: "index_deployments_on_created_at"
t.index ["deployable_type", "deployable_id"], name: "index_deployments_on_deployable_type_and_deployable_id"
t.index ["environment_id", "id"], name: "index_deployments_on_environment_id_and_id"
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment