High Rails

Use database constraints

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
View
PostgreSQL Standards
24 rules • 0 standards
View
MySQL Standards
24 rules • 0 standards
View
MongoDB Best Practices
24 rules • 1 standard
View
Redis Guidelines
24 rules • 0 standards
View
SQLite Standards
24 rules • 0 standards
View
Code Review Standards
214 rules • 0 standards
View

Add This Rule

Sign in to add this rule to your workspace

Sign in with GitHub

Details

Severity
High
Category
Rails
Used in
7 rulesets