Database constraints made easy for ActiveRecord.

Data integrity is a good thing. Constraining the values allowed by your application at the database-level, rather than at the application-level, is a more robust way of ensuring your data stays sane.Unfortunately, ActiveRecord doesn't encourage (or even allow) you to use database integrity without resorting to hand-crafted SQL. Rein (pronounced "rain") adds a handful of methods to your ActiveRecord migrations so that you can easily tame the data in your database.All methods in the DSL are automatically reversible, so you can take advantage of reversible Rails migrations.
Database constraints made easy for ActiveRecord. #ruby #rubydeveloper #rubyonrails #activerecord. #database https://rubyonrails.ba/single/database-constraints-made-easy-for-activerecord

Nezir Zahirovic

Contractor Ruby On Rails (8+ years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles