Enums Can Be Enforced at the Database Level in PostgreSQL
A PostgreSQL column can be restricted to a predefined set of values using an enumerated type (enum).
A PostgreSQL column can be restricted to a predefined set of values using an enumerated type (enum).
Add a uniqueness constraint between two columns in Ruby on Rails.
Configure Rails decimal columns with precision and scale to prevent rounding errors.