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

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

class DropTemporaryColumnsAndTriggersForCiBuildTraceChunks < Gitlab::Database::Migration[1.0]
  disable_ddl_transaction!

  TABLE = 'ci_build_trace_chunks'
  COLUMN = 'build_id'

  # rubocop:disable Migration/WithLockRetriesDisallowedMethod
  def up
    with_lock_retries do
      cleanup_conversion_of_integer_to_bigint(TABLE, COLUMN)
    end
  end
  # rubocop:enable Migration/WithLockRetriesDisallowedMethod

  def down
    restore_conversion_of_integer_to_bigint(TABLE, COLUMN)
  end
end