High
Rails
Use database constraints
Official
Rule Description
Add NOT NULL, UNIQUE indexes, foreign keys, check constraints. Don't rely only on ActiveRecord validations.
Included in Rulesets
Rails Standards
52 rules • 1 standard
PostgreSQL Standards
24 rules • 0 standards
MySQL Standards
24 rules • 0 standards
MongoDB Best Practices
24 rules • 1 standard
Redis Guidelines
24 rules • 0 standards
SQLite Standards
24 rules • 0 standards
Code Review Standards
214 rules • 0 standards
Add This Rule
Sign in to add this rule to your workspace
Sign in with GitHubDetails
- Severity
- High
- Category
- Rails
- Used in
- 7 rulesets