summaryrefslogtreecommitdiff
path: root/db/migrate/20210819153805_set_default_job_token_scope_true.rb
blob: 4536f6649501cc7b1d7da0ee629923a45a2e881b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

class SetDefaultJobTokenScopeTrue < ActiveRecord::Migration[6.1]
  include Gitlab::Database::MigrationHelpers

  def up
    with_lock_retries do
      change_column_default :project_ci_cd_settings, :job_token_scope_enabled, from: false, to: true
    end
  end

  def down
    with_lock_retries do
      change_column_default :project_ci_cd_settings, :job_token_scope_enabled, from: true, to: false
    end
  end
end