In "Five Common Rails Mistakes" Mike Perham reminds Rails developers to put data constraints (via migrations) into the database schema. Yes. For excellent detailed discussions of why, see:
- Should you enforce constraints at the database level as well as the application level? at Stack Overflow
- Handling Advanced Database Features with Rails chapter from Advanced Rails
Both are long, and well-worth taking the time to read thoroughly.
A common counter-argument to these is duplication. As the Advanced Rails excerpt notes, database logic and business logic are separate layers. Here are some gems to check out for DRYing up your models and schema: