-
- Downloads
There was a problem fetching the pipeline summary.
Added RuboCop cops for checking DB migrations
There are currently two cops for this: * Migration/AddIndex: checks if indexes are added concurrently * Migration/ColumnWithDefault: checks if columns with default values are added in a concurrent manner Both cops are fairly simple and make no attempt at correcting the code as this is quite hard to do (e.g. modifications may need to be applied in various places in the same file). They however should provide enough to catch people ignoring the comments in generated migrations telling them to use add_concurrent_index or add_column_with_default.
parent
d33991f8
No related branches found
No related tags found
Pipeline #
Showing
- .rubocop.yml 3 additions, 1 deletion.rubocop.yml
- rubocop/cop/migration/add_index.rb 46 additions, 0 deletionsrubocop/cop/migration/add_index.rb
- rubocop/cop/migration/column_with_default.rb 50 additions, 0 deletionsrubocop/cop/migration/column_with_default.rb
- rubocop/migration_helpers.rb 10 additions, 0 deletionsrubocop/migration_helpers.rb
- rubocop/rubocop.rb 3 additions, 0 deletionsrubocop/rubocop.rb
rubocop/cop/migration/add_index.rb
0 → 100644
rubocop/cop/migration/column_with_default.rb
0 → 100644
rubocop/migration_helpers.rb
0 → 100644
rubocop/rubocop.rb
0 → 100644
-
@yorickpeterse MR - https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/513
build - https://gitlab.com/gitlab-org/gitlab-ee/builds/2099394
Would you mind to fix it?
Edited by Valery Sizov
Please register or sign in to comment