debian-mirror-gitlab/db/post_migrate/20230116091626_add_index_for_events_followed_users.rb
2023-03-17 16:20:25 +05:30

16 lines
362 B
Ruby

# frozen_string_literal: true
class AddIndexForEventsFollowedUsers < Gitlab::Database::Migration[2.1]
disable_ddl_transaction!
INDEX_NAME = 'index_events_for_followed_users'
def up
add_concurrent_index :events, %I[author_id target_type action id], name: INDEX_NAME
end
def down
remove_concurrent_index_by_name :events, INDEX_NAME
end
end