ctran / annotate_models

Annotate Rails classes with schema and routes info
Other
4.41k stars 598 forks source link

Sometimes, Not Detecting Schema Changes After Migration #1022

Open hatsu38 opened 3 months ago

hatsu38 commented 3 months ago

I am experiencing an issue where the annotate gem does not always detect changes in the database schema after performing migrations.

Specifically, changes to indexes and columns are sometimes not reflected in the model annotations.

To work around this, I need to run bin/rails annotate --delete followed by bin/rails annotate_models to see the changes reflected.

I would like annotate to consistently detect and reflect schema changes automatically after every migration.

Commands

$ bin/rails annotate --delete
$ bin/rails annotate_models

Version