Re:Show HN: Stellar – Git for PostreSQL and MySQL
by lucian1900 on Friday August 22, 2014 @07:59AM
(#8211702)
This sort of thing is useful, but already supported by Postgres through transactional DDL. Migrations that fail will have their transaction reverted.
[ Parent
| on HN ]
Re:Show HN: Stellar – Git for PostreSQL and MySQL
by michaelmior on Friday August 22, 2014 @08:41AM
(#8211814)
Suppose 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.)
Re:Show HN: Stellar – Git for PostreSQL and MySQL
by masklinn on Friday August 22, 2014 @09:25AM
(#8211964)
You could use schemas or multiple databases for that.
Re:Show HN: Stellar – Git for PostreSQL and MySQL
by michaelmior on Friday August 22, 2014 @10:38AM
(#8212263)
True. 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.
Re:Show HN: Stellar – Git for PostreSQL and MySQL
by obsession on Friday August 22, 2014 @08:23AM
(#8211753)
Transaction 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).
Re:Show HN: Stellar – Git for PostreSQL and MySQL
by killing_time on Friday August 22, 2014 @08:31AM
(#8211779)
The 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.
Re:Show HN: Stellar – Git for PostreSQL and MySQL
by j_s on Friday August 22, 2014 @11:16AM
(#8212450)
ASP.NET developers using TransactionScope can use http://amnesia.codeplex.com/ to manage distributed transactions for automated UI testing.
Re:Show HN: Stellar – Git for PostreSQL and MySQL
by obsession on Friday August 22, 2014 @02:57PM
(#8213441)
While 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).
Re:Show HN: Stellar – Git for PostreSQL and MySQL
by mdellabitta on Friday August 22, 2014 @08:24AM
(#8211761)
What 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?
Re:Show HN: Stellar – Git for PostreSQL and MySQL
by AlterEgo20 on Friday August 22, 2014 @10:53AM
(#8212338)
Postgres has transactional DDL and DML. If anything fails - everything is rolled back.
Re:Show HN: Stellar – Git for PostreSQL and MySQL
by dragonwriter on Friday August 22, 2014 @10:58AM
(#8212366)
"Transnational" => "Transactional"
Re:Show HN: Stellar – Git for PostreSQL and MySQL
by AlterEgo20 on Friday August 22, 2014 @11:05AM
(#8212404)
Yep. Damn auto correct.