5 ms·
"Avoiding situations like this is the best policy though as unexpected things will happen" Yes, but they happen. This seems like replying to someone drowning "
by eggbrain 14y ago
"Avoiding situations like this is the best policy though as unexpected things will happen"
Yes, but they happen. This seems like replying to someone drowning "well, you should have avoided swimming!"
You also make the assumption that we are using Rails (or some framework with migration support) -- many people won't have that luxury.
Finally, while the setup might be challenging (as in, figuring out a way to implement db tracking in git), I find it very curious that it would be much easier in anyones mind to do two tasks, doing all the rollbacks and switching branches, vs just switching the branch.
- mhitza 14y agoI'll start hacking on that. Now to keep this comment, if it ever comes to happen, I'll notify you :)
- atomical 14y agoThis isn't a setup issue. Don't work on more than one branch/feature at a time. It's a bad idea and not conducive to getting shit done.
- eggbrain 14y agoGit checkout -b "feature-1" Git commit -am "Added feature 1, which included a migration" Git checkout -b "feature-2-that-builds-off-feature-1" Git commit -am "Added feature 2, which includes another migration" Git checkout master Broken (and with multiple migration files, even though I branched off for each new feature.)
- grey-area 14y agoHave you considered branching the database along with your code?
- samspot 14y agoYou act like we have a choice in the matter. "Sorry, I can't look into your emergency production problem, I'm adding features to a blog."