Report unique constraints with missing Rails validations
This is the opposite behaviour of the gem, but it seems it would be useful to identify instances in which the unique constraint is defined at the database (schema) level, but not specified (eg via uniqueness: true) in the Rails model.
This could be an additional check which happens only if specified by a command-line option when executing consistency_fail, so as not to break backwards compatibility and to avoid reporting on these problems if not required. Some models may deliberately omit the validation in Rails, for instance (perhaps for performance reasons).
Does this sound like it'd be useful?
Generally speaking, yes! The tricky piece is that has_one is another valid place to want a constraint, so I think I might want that to be detected too?