mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-26 01:33:22 +00:00
Don't enforce ApplicationRecord in migrations
We shouldn't use app code in migrations because app code changes while migrations should always do the same to enable old servers to upgrade. We have some existing migrations which use ApplicationRecord but I found that changing them retrospectively breaks them already. So let's leave them alone.
This commit is contained in:
@@ -44,6 +44,11 @@ Metrics/BlockLength:
|
||||
"xdescribe",
|
||||
]
|
||||
|
||||
Rails/ApplicationRecord:
|
||||
Exclude:
|
||||
# Migrations should not contain application code:
|
||||
- "db/migrate/*.rb"
|
||||
|
||||
Rails/SkipsModelValidations:
|
||||
AllowedMethods:
|
||||
- "touch"
|
||||
|
||||
Reference in New Issue
Block a user