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

class RevertDefaultJobTokenScope < 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: true, to: false
    end
  end

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