blob: 51460a9dc95f13b4390236de113f3e998b02d11e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
# frozen_string_literal: true
# See https://docs.gitlab.com/ee/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
class RemoveOldCalendarEventsIndex < Gitlab::Database::Migration[1.0]
disable_ddl_transaction!
OLD_INDEX_NAME = 'index_events_on_author_id_and_project_id'
def up
remove_concurrent_index_by_name :events, OLD_INDEX_NAME
end
def down
add_concurrent_index :events, [:author_id, :project_id], name: OLD_INDEX_NAME
end
end
|