Thank you Jeremy, I have confidence in your guesses. :-) My use case is 
refining a schema on the receiving end of a fairly complex data migration 
project with the objective to have a clean set of migrations I can use to 
create the destination db. And yes, all my migrations are and will remain 
reversible and able to migrate down to zero and back.

Happy holidays!
On Tuesday, December 22, 2020 at 10:01:40 PM UTC-8 Jeremy Evans wrote:

> On Tue, Dec 22, 2020 at 6:35 PM John Knapp <[email protected]> wrote:
>
>> Hi,
>>
>> I'm using integer migrations and the common rake tasks using 
>> args[:version].
>>
>> My goal is to run a particular migration in a direction of my choice.
>>
>> Taking advantage of args[:current] I've had luck with
>>
>>       rake db:migrate{18,17] (takes 18 down)
>>
>> *immediately* followed by
>>
>>       rake db:migrate{17,18] (takes 18 up)
>>
>> *Question:*
>> If I make sure schema_info has the appropriate current_version, what 
>> other problems might I encounter?
>>
>
> Assuming that you are only migrating down and then up the latest version, 
> and the down block executes the reverse the up block previously executed, 
> I'm guessing you will be fine.
>
> I often have a rake test that migrates all migrations down and back up on 
> the test database.  It's a good practice to make sure your down migrations 
> work.
>
> Thanks,
> Jeremy
>

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sequel-talk/86a55f24-3139-4000-ac5b-6f47e14804a5n%40googlegroups.com.

Reply via email to