Rails#
See Getting started for usage examples.
Schema source#
colref looks for a schema source in the following order:
db/schema.rb— the standard Rails schema dump (:rubyformat). Present in most projects.db/structure.sql— used whenconfig.active_record.schema_format = :sql(PostgreSQL-specific features such as custom types, partial indexes, or materialized views thatschema.rbcannot represent). Supports PostgreSQL, MySQL, and SQLite quoting styles.db/migrate/— fallback when no schema dump is committed. colref replays migration files in timestamp order —create_table,add_column,remove_column,rename_column,drop_table— to reconstruct the current schema.
Model and field validation are fully intact regardless of which source is used.
Detection coverage#
See Detection patterns — Rails for the full per-pattern breakdown.