debian-mirror-gitlab/db/post_migrate/20230127115607_add_hosted_plan_id_and_trial_index_to_gitlab_subscriptions.rb
2023-04-23 21:23:45 +05:30

16 lines
422 B
Ruby

# frozen_string_literal: true
class AddHostedPlanIdAndTrialIndexToGitlabSubscriptions < Gitlab::Database::Migration[2.1]
INDEX_NAME = 'index_gitlab_subscriptions_on_hosted_plan_id_and_trial'
disable_ddl_transaction!
def up
add_concurrent_index :gitlab_subscriptions, [:hosted_plan_id, :trial], name: INDEX_NAME
end
def down
remove_concurrent_index_by_name :gitlab_subscriptions, INDEX_NAME
end
end