4 ms·
This sort of thing is useful, but already supported by Postgres through transactional DDL. Migrations that fail will have their transaction reverted.
by lucian1900 12y ago
This sort of thing is useful, but already supported by Postgres through transactional DDL. Migrations that fail will have their transaction reverted.
- obsession 12y agoTransaction is only reverted if the migration fails. Stellar helps you if your migration succeeds but does the wrong thing (deleting wrong column, missing WHERE in UPDATE statement).
- mdellabitta 12y agoWhat if you're writing a migration that includes DML, and it fails partway through? Wouldn't it be good to be able to restore the DB state automatically and try again?
- AlterEgo20 12y agoPostgres has transactional DDL and DML. If anything fails - everything is rolled back.
- dragonwriter 12y ago"Transnational" => "Transactional"
- AlterEgo20 12y agoYep. Damn auto correct.
- killing_time 12y agoThe use case which this really excites me about is automated testing from the GUI level. If the performance is good enough, this would be really useful for restoring DB state in between tests.
- j_s 12y agoASP.NET developers using TransactionScope can use http://amnesia.codeplex.com/ http://amnesia.codeplex.com/ to manage distributed transactions for automated UI testing.
- obsession 12y agoWhile doing single restore is fast enough, you will have problems doing multiple restores in a row as the background process needs to finish before another restore is possible (which may take several seconds when you are dealing with big databases).
- michaelmior 12y agoSuppose I'm working on a new feature branch and I run a bunch of migrations and add new data. Then I need to go make a bug fix on the master branch. Using Stellar, I could just take a snapshot before starting my feature branch, restore the DB state, do my bug fix, then go back to the DB as it was in my feature branch. I haven't tried Stellar yet, but this seems like a scenario where it would be useful. (And definitely not supported through Postgres transactions.)
- masklinn 12y agoYou could use schemas or multiple databases for that.
- michaelmior 12y agoTrue. Although then you would have to worry about changing your DB configuration whenever you change branches. You'd also have to make a copy of your database manually any time you want to start modifying it. Stellar seems like an easier solution.