debian-mirror-gitlab/db/migrate/20220615091059_add_created_at_index_to_compliance_management_frameworks.rb
2022-07-23 20:15:48 +02:00

18 lines
514 B
Ruby

# frozen_string_literal: true
class AddCreatedAtIndexToComplianceManagementFrameworks < Gitlab::Database::Migration[2.0]
disable_ddl_transaction!
INDEX_NAME = "i_compliance_frameworks_on_id_and_created_at"
def up
add_concurrent_index :compliance_management_frameworks,
[:id, :created_at, :pipeline_configuration_full_path],
name: INDEX_NAME
end
def down
remove_concurrent_index_by_name :compliance_management_frameworks, INDEX_NAME
end
end