From 4706352416005962ccb34bad1c3acc5d7479523c Mon Sep 17 00:00:00 2001 From: Mayra Cabrera Date: Fri, 23 Aug 2019 21:36:12 +0000 Subject: Adds cop to enforce string limits on migrations This cop will analyze migrations that add columns with string, and report an offense if the string has no limit enforced Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/64505 --- .../20190625184066_remove_sentry_from_application_settings.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'db/post_migrate/20190625184066_remove_sentry_from_application_settings.rb') diff --git a/db/post_migrate/20190625184066_remove_sentry_from_application_settings.rb b/db/post_migrate/20190625184066_remove_sentry_from_application_settings.rb index 427df343193..9d71bfafffb 100644 --- a/db/post_migrate/20190625184066_remove_sentry_from_application_settings.rb +++ b/db/post_migrate/20190625184066_remove_sentry_from_application_settings.rb @@ -32,7 +32,7 @@ class RemoveSentryFromApplicationSettings < ActiveRecord::Migration[5.0] end SENTRY_DSN_COLUMNS.each do |column| - add_column(:application_settings, column, :string) unless column_exists?(:application_settings, column) + add_column(:application_settings, column, :string) unless column_exists?(:application_settings, column) # rubocop:disable Migration/AddLimitToStringColumns end end end -- cgit v1.2.3