Welcome to mirror list, hosted at ThFree Co, Russian Federation.

20231030154117_insert_new_ultimate_trial_plan_into_plans.rb « post_migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: af589f6337aaaeb5c9bd10ec22e41e394aa659e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# frozen_string_literal: true

class InsertNewUltimateTrialPlanIntoPlans < Gitlab::Database::Migration[2.2]
  milestone '16.6'

  disable_ddl_transaction!

  restrict_gitlab_migration gitlab_schema: :gitlab_main

  def up
    execute <<~SQL
      INSERT INTO plans (name, title, created_at, updated_at)
      VALUES ('ultimate_trial_paid_customer', 'Ultimate Trial for Paid Customer', current_timestamp, current_timestamp)
    SQL
  end

  def down
    # NOTE: We have a uniqueness constraint for the 'name' column in 'plans'
    execute <<~SQL
      DELETE FROM plans
      WHERE name = 'ultimate_trial_paid_customer'
    SQL
  end
end