> I think the problem could potentially be resolved if the database
> stored the code to run the down method of a migration along with the
> list of migrations that have run.  On rake db:migrate, if a migration
> is missing, it could prompt (or accept an option) to automatically run
> the down method for the missing migrations.

That'd work only for cases where your down migrations *only* change
the schema, they don't touch models or any other ruby code.  Otherwise
there's no guarantee that those models are available when the system
tries to downgrade.

Why can't you run the down migration before rolling back the code?
That's the only reliable way you'll be able to do this.

-- 
Cheers

Koz

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to rubyonrails-core@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-core+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to