Skip to content

Disallow usage of ApplicationRecord in migrations

Krasimir Angelov requested to merge extend-migration-record-rubocop-rule into master

What does this MR do and why?

With #362341 we want to limit and eventually stop any direct usage of ActiveRecord::Base and ApplicationRecord in the app. We already have a rule to prevent using ActiveRecord::Base in migrations, and to recommend using the dedicated MigrationRecord. This MR extends the rule to also check of ApplicationRecord usage.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports