When teams start to grow, having a single dev environment becomes an issue. People start stepping on each others toes. A common problem is that two pe

Branchable MySQL: Managing multiple dev environments

submited by
Style Pass
2022-09-21 17:30:06

When teams start to grow, having a single dev environment becomes an issue. People start stepping on each others toes. A common problem is that two people want to apply incompatible migrations on the database. That problem is impossible to fix if folks are working on parallel branches. If we can have a database for each branch of a project, that will remove much of the pain of having multiple devs applying changes to the db.

We have a people table in the database. One of the devs wants to add the last_name column and the other one wants to add the address .

In reality the table will have 4 columns. So neither of them will be able to run their code unless they talk to each other and figure out how to make this work.

That way we can have a feature/user-last-name 'branch' read and write data from a directory like /app/user-last-name/mysql/data .

I decided to do a little implementation using Docker and python FastAPI. Exposing a simple interface so that it's easy to create and delete branches.

Leave a Comment