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
When I run a forward migration, my models are annotated correctly.
Because I'm running two DBs locally, I have to specify a DB name for either db:down or db:rollback.
For db:down it appears that annotations run but comment doesn't change in model.
For db:rollback it appears that annotations don't run, and of course, comment doesn't change in model.
I'm guessing that the issue is that both db:rollback and db:down require specific DB names and something is getting confused.
Looks like annotate doesn't run. NO change to model comment.
NOTE: If I re-run annotate on command line after reversion, model comments are fixed.
Version
annotate version: 3.2.0
rails version: 6.1.7.6
ruby version: 3.2.2
=============
I'm attempting to fix by doing the following in a file lib/tasks/db/enhancements.rake, but it's not invoking the annotate_models task.
Rake::Task["db:rollback"].enhance do
Rake::Task["annotate_models"].execute
end
Rake::Task["db:migrate:down"].enhance do
Rake::Task["annotate_models"].execute
end
The text was updated successfully, but these errors were encountered:
When I run a forward migration, my models are annotated correctly.
Because I'm running two DBs locally, I have to specify a DB name for either
db:down
ordb:rollback
.For
db:down
it appears that annotations run but comment doesn't change in model.For
db:rollback
it appears that annotations don't run, and of course, comment doesn't change in model.I'm guessing that the issue is that both
db:rollback
anddb:down
require specific DB names and something is getting confused.Commands
Command:
Output:
Looks like annotate runs, says no model change. NO change to model comment.
Command:
Output:
Looks like annotate doesn't run. NO change to model comment.
NOTE: If I re-run
annotate
on command line after reversion, model comments are fixed.Version
=============
I'm attempting to fix by doing the following in a file
lib/tasks/db/enhancements.rake
, but it's not invoking theannotate_models
task.The text was updated successfully, but these errors were encountered: