This project is archived and is in readonly mode.

#3548 ✓stale
Andrew Selder

Console --sandbox only works for main connection (Potential data loss/corruption)

Reported by Andrew Selder | December 8th, 2009 @ 01:44 AM

If you have a rails app that talks to multiple databases, or has multiple connections to a single database, script/console --sandbox will NOT rollback any changes to models made via connections other than the one associated with ActiveRecord::Base.

At the very least this needs to be explicitly mentioned in big letters in the documentation. We just lost a bunch of data when a developer did a Xxxx.delete_all in sandbox, when Xxxx didn't use AR::Base's connection.

Comments and changes to this ticket

  • Ryan Bigg

    Ryan Bigg October 7th, 2010 @ 10:10 PM

    • State changed from “new” to “incomplete”
    • Importance changed from “” to “Low”

    Please attach a documentation patch for this if you wish to see it fixed.

  • Santiago Pastorino

    Santiago Pastorino February 2nd, 2011 @ 04:58 PM

    • 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.

  • Santiago Pastorino

    Santiago Pastorino February 2nd, 2011 @ 04:58 PM

    • State changed from “open” to “stale”

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>

People watching this ticket