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

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

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

  disable_ddl_transaction!

  TABLE_NAME = 'ci_job_artifacts'
  COLUMN_NAME = 'locked'

  def up
    with_lock_retries do
      add_column TABLE_NAME, COLUMN_NAME, :smallint, default: 2
    end
  end

  def down
    with_lock_retries do
      remove_column TABLE_NAME, COLUMN_NAME
    end
  end
end