diff --git a/spec/tooling/danger/bulk_database_actions_spec.rb b/spec/tooling/danger/bulk_database_actions_spec.rb index 18a46f663c07e42711880eaf51ad5601bb41397b..2ac4ff995f3f851e7c6a4fc92b0add7ff6a96ca1 100644 --- a/spec/tooling/danger/bulk_database_actions_spec.rb +++ b/spec/tooling/danger/bulk_database_actions_spec.rb @@ -56,6 +56,7 @@ 'upsert_all', 'User.upsert', 'User.last.destroy', + 'destroy', ' .destroy' ] end diff --git a/tooling/danger/bulk_database_actions.rb b/tooling/danger/bulk_database_actions.rb index 7f3edaf76631de7380dbf18fa8e40f56bed8f49f..ed2b7c493acd51a879bf97a1484f3ef4edb469d9 100644 --- a/tooling/danger/bulk_database_actions.rb +++ b/tooling/danger/bulk_database_actions.rb @@ -10,11 +10,13 @@ class BulkDatabaseActions < Suggestion DOCUMENTATION_LINK = 'https://docs.gitlab.com/ee/development/database_review.html#preparation-when-using-bulk-update-operations' SUGGESTION = <<~MESSAGE_MARKDOWN.freeze - When using `update`, `upsert`, `delete`, `update_all`, `upsert_all`, `delete_all` or `destroy_all` - you must include the full database query and query execution plan in the merge request description, - and request a ~database review. + When using `update`, `upsert`, `delete`, `destroy`, `update_all`, + `upsert_all`, `delete_all` or `destroy_all` you must include the full + database query and query execution plan in the merge request + description, and request a ~database review. - This comment can be ignored if the object is not an ActiveRecord class, since no database query would be generated. + This comment can be ignored if the object is not an ActiveRecord class, + since no database query would be generated. ----