diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-01 12:11:01 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-01 12:11:01 +0000 |
commit | 08b3b98051f56cfc1774db5c92c183cf33ed8bdd (patch) | |
tree | d93e764b9ac3fd30eaf827a1017fbb40a7abf40c /rubocop | |
parent | a928c5170fa58e4aef91ebca6c4fc9ec7cea812e (diff) | |
download | gitlab-ce-08b3b98051f56cfc1774db5c92c183cf33ed8bdd.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'rubocop')
-rw-r--r-- | rubocop/cop/migration/safer_boolean_column.rb | 2 | ||||
-rw-r--r-- | rubocop/migration_helpers.rb | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/rubocop/cop/migration/safer_boolean_column.rb b/rubocop/cop/migration/safer_boolean_column.rb index 25aaf42d00e..22d5d37a83d 100644 --- a/rubocop/cop/migration/safer_boolean_column.rb +++ b/rubocop/cop/migration/safer_boolean_column.rb @@ -37,7 +37,7 @@ module RuboCop table, _, type = matched.to_a.take(3).map(&:children).map(&:first) opts = matched[3] - return unless WHITELISTED_TABLES.include?(table) && type == :boolean + return unless SMALL_TABLES.include?(table) && type == :boolean no_default = no_default?(opts) nulls_allowed = nulls_allowed?(opts) diff --git a/rubocop/migration_helpers.rb b/rubocop/migration_helpers.rb index 355450bbf57..7c0ab441c28 100644 --- a/rubocop/migration_helpers.rb +++ b/rubocop/migration_helpers.rb @@ -1,14 +1,13 @@ module RuboCop # Module containing helper methods for writing migration cops. module MigrationHelpers - WHITELISTED_TABLES = %i[ + # Tables with permanently small number of records + SMALL_TABLES = %i[ application_settings plan_limits ].freeze - # Blacklisted tables due to: - # - number of columns (> 50 on GitLab.com as of 03/2020) - # - number of records + # Tables with large number of columns (> 50 on GitLab.com as of 03/2020) WIDE_TABLES = %i[ users projects |