# gregnavis/active_record_doctor

Identify database issues before they hit production.

Repository: https://github.com/gregnavis/active_record_doctor
Canonical: https://ross.abutalabs.com/products/active_record_doctor
Language: Ruby
License: MIT
License Family: permissive
Topics: database, rails, activerecord, performance, ruby
Last push: 2026-07-09T13:59:32+00:00

## Health v2 (maintenance only)
Score: 73/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 91, release rhythm 35, longevity 100
- inputs: {"age_days": 3854, "days_push": 55, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1916, forks 69 (observed 2026-08-28T04:05:53.765242+00:00)

## What it is
A Ruby gem that detects database issues in Rails applications, such as extraneous indexes, missing foreign key constraints, and validations not backed by database constraints. It ships as a set of Rake tasks that analyze Active Record models and schemas before problems reach production.

## Use cases
- find missing foreign key constraints in a rails app
- detect unindexed foreign keys before deploying
- check uniqueness validations are backed by unique indexes
- find extraneous indexes slowing down writes
- audit activerecord models against the database schema
- detect missing non-null constraints on columns

## When to choose
- you maintain a Ruby on Rails application with Active Record
- you want automated database schema health checks in CI
- you need to catch index and constraint gaps before production

## When to avoid
- your project does not use Ruby on Rails or Active Record
- you need general-purpose database monitoring rather than schema/model consistency checks

## Facets
- artifact type: library
- maturity: active
- function: database, testing, developer-tools
- domain: databases, developer-tools, web-development
- platform: ruby, cli
- tags: rails, activerecord, database-health, linting, schema-validation

## Member repositories
- gregnavis/active_record_doctor (main) score 73

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:53.765242+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:10:17.847074+00:00, confidence not recorded.
  - readme: https://github.com/gregnavis/active_record_doctor (fetched 2026-08-28T04:05:53.765242+00:00, sha 9293e1d56ed0)
- Data as of 2026-08-30T08:39:29.467469+00:00.
