A Ruby gem that detects database issues in Rails applications before they reach production.
Active Record Doctor is a diagnostic tool for Ruby on Rails applications that scans ActiveRecord models and database schemas to identify potential issues. It helps developers catch problems like missing indexes, inconsistent validations, and schema mismatches before they impact production systems.
Rails developers and teams who want to maintain database health, ensure data integrity, and optimize performance in their applications. Particularly valuable for projects with complex schemas or those undergoing frequent migrations.
It provides automated detection of hard-to-spot database issues that ActiveRecord doesn't catch by default, saving debugging time and preventing production incidents. The tool integrates seamlessly into development workflows and CI pipelines.
Identify database issues before they hit production.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Scans for over 15 specific problems like extraneous indexes, missing foreign keys, and schema-validation mismatches, covering a wide range of database health concerns as detailed in the README.
Installs easily via Gemfile and uses familiar Rake tasks, fitting naturally into Rails development workflows without disrupting existing processes.
Allows ignoring specific tables, models, or indexes using strings or regexps, enabling teams to tailor checks to their project's needs, as shown in the configuration examples.
Returns a non-zero exit status when issues are detected, making it straightforward to integrate into continuous integration systems for automated checks.
Many detectors only identify issues without generating fixes; for example, missing foreign key constraints and unindexed deleted_at columns require manual migration creation, as noted in the README.
For projects without Rails, additional Rakefile configuration is required, including setting up dependencies and model loading, which can be cumbersome and error-prone.
Users must manually review findings and configure ignores, as the tool might flag legitimate cases like legacy tables or custom associations, adding overhead to the validation process.