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

20221216151459_validate_foreign_key_on_ci_build_pending_state_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: 6ea8cb213ab6d762aaadbc0c44c9f06dd94ba937 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# frozen_string_literal: true

class ValidateForeignKeyOnCiBuildPendingStatePartitionIdBuildId < Gitlab::Database::Migration[2.1]
  TABLE_NAME = :ci_build_pending_states
  FK_NAME = :fk_rails_0bbbfeaf9d_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