debian-mirror-gitlab/db/migrate/20191124150431_change_label_id_index_to_include_action_on_label_events.rb
2020-01-01 13:55:28 +05:30

22 lines
514 B
Ruby

# frozen_string_literal: true
class ChangeLabelIdIndexToIncludeActionOnLabelEvents < ActiveRecord::Migration[5.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
add_concurrent_index(:resource_label_events, %I[label_id action])
remove_concurrent_index(:resource_label_events, :label_id)
end
def down
add_concurrent_index(:resource_label_events, :label_id)
remove_concurrent_index(:resource_label_events, %I[label_id action])
end
end