Git branching, database scripts source control, and containers

Application code has long been using Git as a repo for source code. With git hooks, repo changes kick off devops pipelines.

Database scripts can also be stored in git repositories and Git source code control, branching and merging can be used with them as well. Since application development on releases is closely related to database script development, it is important to keep both the application code and database code in the same repo. That way, feature and release branches can ensure consistency across application code and database code. By checking in database release / feature scripts to Git, your database code is consistent with application code and database development can happen efficiently in parallel across features and releases.

Git database scripts, devops pipelines and containers

Windocks SQL Server containers and docker Oracle containers combined with database cloning delivers production database clones for test and staging. While developing or testing database scripts, its a best practice to test those scripts with production data clones. Using Git branching, you can check in database scripts to release and feature specific branches which also host the app code for those releases or branches. A devops pipeline can be triggered by a change to a database script pushed to the repo. The pipeline pulls the app code and the corresponding database script code from the same Git branch. The pipeline further creates the database container, clones the database, attaches the database clone to the container and applies the scripts that were pulled from the repo. With a solution like Windocks, all of this is automated for you. You provide the spec and Windocks does all the rest.

Explore topics