debian-mirror-gitlab/db/migrate/20210104163218_add_epic_board_position_index.rb
2021-03-08 18:12:59 +05:30

18 lines
501 B
Ruby

# frozen_string_literal: true
class AddEpicBoardPositionIndex < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
INDEX_NAME = 'index_boards_epic_board_positions_on_scoped_relative_position'
disable_ddl_transaction!
def up
add_concurrent_index :boards_epic_board_positions, [:epic_board_id, :epic_id, :relative_position], name: INDEX_NAME
end
def down
remove_concurrent_index_by_name :boards_epic_board_positions, INDEX_NAME
end
end