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

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

class ValidateForeignKeyOnCiUnitTestFailurePartitionIdBuildId < Gitlab::Database::Migration[2.1]
  TABLE_NAME = :ci_unit_test_failures
  FK_NAME = :fk_0f09856e1f_p
  PARTITION_COLUMN = :partition_id
  COLUMN = :build_id

  def up
    validate_foreign_key(TABLE_NAME, [PARTITION_COLUMN, COLUMN], name: FK_NAME)
  end

  def down
    # no-op
  end
end