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/CADGZSSf8%3D3JKMXJV%3DmEGgGtxx8nR1WgsE1TtNYkgrHxyj1dP_Q%40mail.gmail.com.