How can we help you today? How can we help you today?

Recommend Git repo structure for multiple Db's and SQL Instances?

So we have several SQL instances and each will have several Db's my team wants to manage.  There are several cases where changes are needed to more than one Db on a given instance, hence putting every Db on the instance all within the same repo.  Is there a recommended way or structure when several Db's and SQL instances are involved?  Surely not a Git repo per Db?

What Im getting up now

Repo = SQL1
../Db1
../Db2
../Db3

Repo = SQL2
../Db1
../Db2
../Db3

bitshift2
0

Comments

2 comments

  • AlessandroAlpi
    Hi @bitshift2,
    choosing a "repo-style" is something which is related to source controlling your database, not related to the production environment you're working on. I suppose that this topic should be covered with a deep discussion on your team, about how to manage source control and branching style of your repositories for the databases themselves. If I got it correctly, you need to answer some questions, like the following ones:
    • is the database "codebase" the same across "some" database?
    • will you deliver a single database with changes in different installations?
    • how will you automate release processes and what is the toolset you're using (or is available for you) right now?
    and si on, they are just some example. Covering this topic is a long-term process within your team and that should be made with your teammates, too.
    AlessandroAlpi
    0
  • AlexYates
    Alessandro is spot on.

    Essentially you need to balance the need to manage all DBs as a single unit (because dependencies) and the need for agility (because if every DB is managed independently you don't need to get everyone to agree to release everything at once).

    In the centralised source control (TFTC/SVN etc) world folks tended to have bigger repos, but in the distributed (git) world folks tend toward smaller, isolated, dare I say, "microservices".

    Basically, if you plan to release DB updates for different dbs independently, you should probably have a repo per DB... Unless that's totally impractical because dependencies. And if that's the case you will probably need to group DBs together, but its also a good sign that you should try to remove some of those dependencies.
    AlexYates
    0

Add comment

Please sign in to leave a comment.