You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I see the options --show-indexes and --show-foreign-keys, but if I run annotate with them, I cannot get it to work. What is annotate looking for to be able to include these in the annotations? Is it looking at the DB migrations? Is it looking at belongs_to associations in the models? Both? Something else?
My migrations contains t.index statements within the create_table calls, as well as add_foreign_key statements as necessary. My models are for legacy tables and don't use the default :id column, so in the belongs_to associations I must use :foreign_key to specify the column. Like:
I see the options
--show-indexes
and--show-foreign-keys
, but if I run annotate with them, I cannot get it to work. What is annotate looking for to be able to include these in the annotations? Is it looking at the DB migrations? Is it looking atbelongs_to
associations in the models? Both? Something else?My migrations contains
t.index
statements within thecreate_table
calls, as well asadd_foreign_key
statements as necessary. My models are for legacy tables and don't use the default:id
column, so in thebelongs_to
associations I must use:foreign_key
to specify the column. Like:So I'm not sure if I have something set up incorrectly, or if I'm possibly doing something else wrong. I'd appreciate any help.
Commands
Version
The text was updated successfully, but these errors were encountered: