diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-18 21:09:35 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-18 21:09:35 +0300 |
commit | 5bfb8d1fad825eec90b0af688c7cd1b352c9056e (patch) | |
tree | 385411919c4186d11a769385ad8dafeef6cc36a7 /rubocop/migration_helpers.rb | |
parent | aaf59610548d9b0fd01acfd50e831cbe519ecba2 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'rubocop/migration_helpers.rb')
-rw-r--r-- | rubocop/migration_helpers.rb | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/rubocop/migration_helpers.rb b/rubocop/migration_helpers.rb index 767cacaecaf..b5edb502d4c 100644 --- a/rubocop/migration_helpers.rb +++ b/rubocop/migration_helpers.rb @@ -1,6 +1,49 @@ module RuboCop # Module containing helper methods for writing migration cops. module MigrationHelpers + WHITELISTED_TABLES = %i[ + application_settings + plan_limits + ].freeze + + # Blacklisted table due to: + # - size in GB (>= 10 GB on GitLab.com as of 02/2020) + # - number of records + BLACKLISTED_TABLES = %i[ + audit_events + ci_build_trace_sections + ci_builds + ci_builds_metadata + ci_job_artifacts + ci_pipeline_variables + ci_pipelines + ci_stages + deployments + events + issues + merge_request_diff_commits + merge_request_diff_files + merge_request_diffs + merge_request_metrics + merge_requests + namespaces + note_diff_files + notes + project_authorizations + projects + project_ci_cd_settings + push_event_payloads + resource_label_events + routes + sent_notifications + services + system_note_metadata + taggings + todos + users + web_hook_logs + ].freeze + # Returns true if the given node originated from the db/migrate directory. def in_migration?(node) dirname(node).end_with?('db/migrate', 'db/geo/migrate') || in_post_deployment_migration?(node) |