debian-mirror-gitlab/db/migrate/20221208122921_remove_constraints_from_ci_resources_for_partition_id.rb
2023-03-04 22:38:38 +05:30

17 lines
473 B
Ruby

# 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