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

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

class AddConstraintToLinksToSpam < Gitlab::Database::Migration[2.1]
  disable_ddl_transaction!

  CONSTRAINT_NAME = "abuse_reports_links_to_spam_length_check"

  def up
    add_check_constraint :abuse_reports, "CARDINALITY(links_to_spam) <= 20", CONSTRAINT_NAME
  end

  def down
    remove_check_constraint :abuse_reports, CONSTRAINT_NAME
  end
end