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

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

class AddMergedCommitShaToMergeRequests < Gitlab::Database::Migration[2.1]
  disable_ddl_transaction!

  def up
    with_lock_retries do
      add_column :merge_requests, :merged_commit_sha, :bytea unless column_exists?(:merge_requests, :merged_commit_sha)
    end
  end

  def down
    with_lock_retries do
      remove_column :merge_requests, :merged_commit_sha if column_exists?(:merge_requests, :merged_commit_sha)
    end
  end
end