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

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

class AddNamespaceSettingsUniqueProjectDownloadLimitAlertlistSizeConstraint < Gitlab::Database::Migration[2.1]
  CONSTRAINT_NAME = 'namespace_settings_unique_project_download_limit_alertlist_size'

  disable_ddl_transaction!

  def up
    add_check_constraint :namespace_settings,
      'CARDINALITY(unique_project_download_limit_alertlist) <= 100',
      CONSTRAINT_NAME
  end

  def down
    remove_check_constraint :namespace_settings, CONSTRAINT_NAME
  end
end