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

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

class RemoveConstraintsFromCiResourcesForPartitionId < Gitlab::Database::Migration[2.1]
  enable_lock_retries!

  def up
    change_column_null :ci_resources, :partition_id, true
  end

  def down
    # no-op
    # Adding back the not null constraint requires a long exclusive lock.
    # Also depending on when it gets called, it might not even be possible to
    # execute because the application could have inserted null values.
  end
end