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

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

class AddApplicationSettingsPackagesCleanupPoliciesWorkerCapacityConstraint < Gitlab::Database::Migration[2.0]
  CONSTRAINT_NAME = 'app_settings_pkg_registry_cleanup_pol_worker_capacity_gte_zero'

  disable_ddl_transaction!

  def up
    add_check_constraint :application_settings,
                         'package_registry_cleanup_policies_worker_capacity >= 0',
                         CONSTRAINT_NAME
  end

  def down
    remove_check_constraint :application_settings, CONSTRAINT_NAME
  end
end