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.
Features
- Documentation available
- Foreign Key Constraints
- Examples available
- Unique Constraints
- Exclusion Constraints
- Match constraints and validate constraints
- Enumerated Types
- A database can contain one or more named schemas
Categories
LibrariesLicense
MIT LicenseFollow Rein
Other Useful Business Software
Ship AI Apps Faster with Vertex AI
Ship AI apps and features faster with Vertex AI—your end-to-end AI platform. Access Gemini 3 and 200+ foundation models, fine-tune for your needs, and deploy with enterprise-grade MLOps. Build chatbots, agents, or custom models. New customers get $300 in free credit.
Rate This Project
Login To Rate This Project
User Reviews
Be the first to post a review of Rein!