Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Migrations rollback in production environment

#5742

Let's say we have batch of migrations in new production deployment.
One migration fails by some reason and deployment didn't occur.

In this case it would be great to rollback all already applied migrations in this deployment but not only the last one because the code will fall back to previous working version but database does not.

As I know Postgres support rollback of structural changes but mysql does not (not sure about others). But implementing this at least for postgres heal us from a lot of pain.

Reported by Bogdan Gusiev · September 30th, 2010 @ 02:32 PM

State: open
Milestone: none
Assigned to: nobody
Importance: Low

Activity

  1. David Trasbo
    David Trasbo
    • State changed from new to incomplete
    • Importance changed from to Low

    Please provide a patch (https://rails.lighthouseapp.com/projects/8994/sending-patches) with a fix and/or a failing test.

    October 9th, 2010 @ 04:20 PM

  2. Santiago Pastorino
    Santiago Pastorino
    • State changed from incomplete to open

    This issue has been automatically marked as stale because it has not been commented on for at least three months.

    The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.

    Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.

    February 2nd, 2011 @ 04:31 PM

  3. Santiago Pastorino
    Santiago Pastorino
    • State changed from open to stale

    February 2nd, 2011 @ 04:31 PM

  4. Bogdan Gusiev
    Bogdan Gusiev
    • State changed from stale to open

    [state:open]

    Yes, I think this is important feature for rails.

    It is connected with production releases and complex migrations when the data should be changed significantly.
    All this process use to fail sometimes.

    In this case if we could rollback the database to the state before migration - we would never have problems with failed deployments.

    Will provide the failing test.

    February 8th, 2011 @ 08:54 AM

  5. Bogdan Gusiev