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 'rubocop/migration_helpers.rb')
-rw-r--r--rubocop/migration_helpers.rb11
1 files changed, 7 insertions, 4 deletions
diff --git a/rubocop/migration_helpers.rb b/rubocop/migration_helpers.rb
index e9533fb65b2..63b3766e126 100644
--- a/rubocop/migration_helpers.rb
+++ b/rubocop/migration_helpers.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module RuboCop
# Module containing helper methods for writing migration cops.
module MigrationHelpers
@@ -7,18 +9,19 @@ module RuboCop
plan_limits
].freeze
- # Tables with large number of columns (> 50 on GitLab.com as of 03/2020)
+ # Tables with large number of columns (> 50 on GitLab.com as of 01/2021)
WIDE_TABLES = %i[
- users
- projects
ci_builds
+ namespaces
+ projects
+ users
].freeze
# List of helpers that add new columns, either directly (ADD_COLUMN_METHODS)
# or through a create/alter table (TABLE_METHODS)
ADD_COLUMN_METHODS = %i(add_column add_column_with_default change_column_type_concurrently).freeze
- TABLE_METHODS = %i(create_table create_table_if_not_exists change_table).freeze
+ TABLE_METHODS = %i(create_table create_table_if_not_exists change_table create_table_with_constraints).freeze
def high_traffic_tables
@high_traffic_tables ||= rubocop_migrations_config.dig('Migration/UpdateLargeTable', 'HighTrafficTables')