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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'db/post_migrate/20221121155850_change_vulnerabilities_state_transitions_comment_limit.rb')
-rw-r--r--db/post_migrate/20221121155850_change_vulnerabilities_state_transitions_comment_limit.rb23
1 files changed, 23 insertions, 0 deletions
diff --git a/db/post_migrate/20221121155850_change_vulnerabilities_state_transitions_comment_limit.rb b/db/post_migrate/20221121155850_change_vulnerabilities_state_transitions_comment_limit.rb
new file mode 100644
index 00000000000..b75216ee413
--- /dev/null
+++ b/db/post_migrate/20221121155850_change_vulnerabilities_state_transitions_comment_limit.rb
@@ -0,0 +1,23 @@
+# frozen_string_literal: true
+
+class ChangeVulnerabilitiesStateTransitionsCommentLimit < Gitlab::Database::Migration[2.0]
+ disable_ddl_transaction!
+
+ def up
+ add_text_limit(
+ :vulnerability_state_transitions,
+ :comment,
+ 50_000,
+ constraint_name: check_constraint_name(:vulnerability_state_transitions, :comment, 'max_length_50000')
+ )
+ remove_text_limit(
+ :vulnerability_state_transitions,
+ :comment,
+ constraint_name: 'check_fca4a7ca39'
+ )
+ end
+
+ def down
+ # no-op: this can fail if records with length > 255 (previous limit) show up
+ end
+end