Database versioning using git

Hi Guys,

i want to use git (i am using bitbucket and sourcetree) to create database versioning system. 

  1. User has to have possiblity to go to previous version. 

If any changes are made in version 2 how to merge it with version for example 5? 

Now i am creating new branch, with version, working on it and when it is done - i am mergin it with the HEAD. 


I’m starting to think of a really simple solution, don’t know why I didn’t think of it before!!

Duplicate the database, (both the schema and the data).
In the branch for the new-major-changes, simply change the project configuration to use the new duplicate database.
This way I can switch branches without worrying about database schema changes.

By duplicate, I mean create another database with a different name (like my_db_2); not doing a dump or anything like that."

Maybe somethinh like this, 

can anyone help and explain it? 



Hi @jaryszek,

This post was moved to a different board that fits your topic of discussion a bit better. This means you’ll get better engagement on your post, and it keeps our Community organized so users can more easily find information.

As you’ll notice, your Topic is now in the Project Development Help and Advice board. No action is needed on your part; you can continue the conversation as normal here.