-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.database_consistency.yml
More file actions
36 lines (32 loc) · 1.41 KB
/
Copy path.database_consistency.yml
File metadata and controls
36 lines (32 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Database Consistency Configuration
# https://github.com/djezzzl/database_consistency
# Run with: bundle exec database_consistency
# Add to CI pipeline for automatic checks
# Enable/disable specific checkers
enabled_checkers:
- ForeignKeyChecker # Ensures associations have foreign keys
- LengthConstraintChecker # Ensures length validations match DB constraints
- NullConstraintChecker # Ensures presence validations match NOT NULL constraints
- UniqueIndexChecker # Ensures uniqueness validations have unique indexes
- ColumnPresenceChecker # Ensures columns used in validations exist
- MissingIndexChecker # Detects missing indexes on foreign keys
- MissingUniqueIndexChecker # Detects missing unique indexes
- PrimaryKeyTypeChecker # Ensures primary key types are correct
- EnumTypeChecker # Ensures enum values match DB constraints
- EnumValueChecker # Ensures enum values are consistent
- RedundantIndexChecker # Detects redundant indexes
- RedundantUniqueIndexChecker # Detects redundant unique indexes
# Exclude specific models or columns from checks
# exclude:
# models:
# - ApplicationRecord
# - ActiveStorage::Blob
# - ActiveStorage::Attachment
# columns:
# - legacy_column
# Custom configuration for specific checkers
# checkers:
# ForeignKeyChecker:
# enabled: true
# NullConstraintChecker:
# enabled: true