summaryrefslogtreecommitdiff
path: root/db/post_migrate/20230127115607_add_hosted_plan_id_and_trial_index_to_gitlab_subscriptions.rb
blob: 1b16ac5c187f6097ad33cad62f10837e7e591f53 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# 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