diff options
author | Mayra Cabrera <mcabrera@gitlab.com> | 2019-08-24 00:36:12 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-08-24 00:36:12 +0300 |
commit | 4706352416005962ccb34bad1c3acc5d7479523c (patch) | |
tree | 334b873d90bf2aa98349f3812e9b1af06f89f484 /db/migrate/20190116234221_add_sorting_fields_to_user_preference.rb | |
parent | b8dec7ecb43d3825f994136ca68e88aada832218 (diff) |
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
Diffstat (limited to 'db/migrate/20190116234221_add_sorting_fields_to_user_preference.rb')
-rw-r--r-- | db/migrate/20190116234221_add_sorting_fields_to_user_preference.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/db/migrate/20190116234221_add_sorting_fields_to_user_preference.rb b/db/migrate/20190116234221_add_sorting_fields_to_user_preference.rb index 7bf581fe9b0..39aab600546 100644 --- a/db/migrate/20190116234221_add_sorting_fields_to_user_preference.rb +++ b/db/migrate/20190116234221_add_sorting_fields_to_user_preference.rb @@ -10,8 +10,8 @@ class AddSortingFieldsToUserPreference < ActiveRecord::Migration[5.0] DOWNTIME = false def up - add_column :user_preferences, :issues_sort, :string - add_column :user_preferences, :merge_requests_sort, :string + add_column :user_preferences, :issues_sort, :string # rubocop:disable Migration/AddLimitToStringColumns + add_column :user_preferences, :merge_requests_sort, :string # rubocop:disable Migration/AddLimitToStringColumns end def down |