Add rules related to migrations

These are rules we can't apply to existing migrations, so I'm excluding
migrations in the affected years from this check. However, we should
probably add timestamps columns and default values in non-null columns
to at least some of the tables which don't have them.
This commit is contained in:
Javi Martín
2019-10-23 22:46:21 +02:00
parent 91a3184281
commit a9359fd570
2 changed files with 10 additions and 6 deletions

View File

@@ -15,9 +15,6 @@ Performance/EndWith:
Performance/StartWith: Performance/StartWith:
Enabled: true Enabled: true
Rails/CreateTableWithTimestamps:
Enabled: true
Rails/EnumUniqueness: Rails/EnumUniqueness:
Enabled: true Enabled: true
@@ -39,9 +36,6 @@ Rails/HasManyOrHasOneDependent:
Rails/InverseOf: Rails/InverseOf:
Enabled: true Enabled: true
Rails/NotNullColumn:
Enabled: true
Rails/ReversibleMigration: Rails/ReversibleMigration:
Enabled: true Enabled: true

View File

@@ -179,6 +179,11 @@ Rails/ApplicationJob:
Rails/ApplicationRecord: Rails/ApplicationRecord:
Enabled: true Enabled: true
Rails/CreateTableWithTimestamps:
Enabled: true
Exclude:
- "db/migrate/201[5-8]*"
Rails/Date: Rails/Date:
Enabled: true Enabled: true
@@ -192,6 +197,11 @@ Rails/FindBy:
Rails/HttpPositionalArguments: Rails/HttpPositionalArguments:
Enabled: true Enabled: true
Rails/NotNullColumn:
Enabled: true
Exclude:
- "db/migrate/201[5-7]*"
Rails/OutputSafety: Rails/OutputSafety:
Enabled: true Enabled: true
Severity: warning Severity: warning