Working on a large app with tons of developers and branches can quickly lead up to polluting your database with unnecessary columns from the migration that you ran from your co worker's branch or your own feature branch that is not merged in the master yet.
The solution could be to go back to your co worker's branch and rollback the damn migration but we are only human beings.
It would have been nice if the database could change with
git checkout -b <new branch>
and remember the old database with
git checkout <old branch>
So, what do you guys use to tackle such issues?
For now, I am writing a bash script that will create a database per branch. https://github.com/sushant12/gla
So, I just finished writing the script and it is working fine. I will be testing the script with my co-worker on our project at work. Till then you guys can try this at your own risk: https://github.com/sushant12/gla
Self care is a hot topic these days, and I’m not just talking about face masks. There is a growing movement that underscores the importance of taking time to take care of yourself (in addition to all the other things that you already take time for). You can prevent problems down the road by taking proactive steps to ensure your health and happiness.