Using Git with PL/SQL in a Shared Development Database
With Gitora 6, developers can work on the same code base (i.e. a package, procedure etc…) in the same database without blocking each other.
Many development teams use a single database for development. Many of them use the same database for testing, as well. They achieve this by using different schemas for different purposes. Gitora 6 enables these teams to create Git repos for these schemas and pull updates between them.
With Gitora 6, you can even create a different schema for every developer and have them merge their code using Git.
Gitora 6 enables you to implement any modern development workflow in a single database.
How does Gitora 6 work?
Gitora 6 introduces a new repo type calledSingle Schema Repo (SSR). As its name suggests an SSR manages database objects from a single schema. The DDL scripts in SSR’s don’t contain the schema prefixes so that Gitora can execute them in other schemas in the same database.
This enables developers to work on the same package, procedure, function, view etc… (i.e. anything that can be created with the CREATE OR REPLACE command) at the same time, in the same database in different schemas.
Let’s go through an example: Let’s assume that the team is working on a logistics software and have a schema named LOGISTICS that stores all their database objects. The team can create a schema (or already have one) called LOGISTICS_TEST in the same database. Here are the steps the team needs to follow so that they can pull their changes to LOGISTICS_TEST.
Create a single schema Gitora repo that manages the LOGISTICS schema. Let’s call it the REPO_LOGISTICS.
Add all relevant database objects in the LOGISTICS schema to the LOGISTICS_REPO.
Create another single schema Gitora repo that manages the LOGISTICS_TEST schema. Let’s call it the REPO_LOGISTICS_TEST
Pull from the REPO_LOGISTICS to REPO_LOGISTICS_TEST
That’s it. That’s all there is to it. From this point on, any change you make to the code in the LOGISTICS schema can be pulled to the LOGISTICS_TEST schema using Gitora (and vice versa).
Single Schema Repos can also be used to create separate development environments in the same database for every developer in the team.
Multiple Developers, Same Database
Assuming we already have the LOGISTICS schema and the REPO_LOGISTICS repo from the previous example, here is how that would work:
Create a schema for each developer: LOGISTICS_JOE, LOGISTICS_MARY, LOGISTICS_PAUL.
Create a single schema Gitora repo for each schema. Let’s call them REPO_LOGISTICS_JOE, REPO_LOGISTICS_MARY, REPO_LOGISTICS_PAUL respectively.
Pull from the REPO_LOGISTICS to REPO_LOGISTICS_JOE, REPO_LOGISTICS_MARY and REPO_LOGISTICS_PAUL.
From this point on, all three developers can work in their own schema and edit any package, procedure, view etc… freely, without overwriting each other’s changes or being affected by them. Using Gitora, they can create new branches in their own repo, for features or bugs they work on without affecting anyone else.
When the time comes to put it all together, they can use Gitora to merge their changes.
Gitora 6 , the latest version of the source control tool for the Oracle Database, enables PL/SQL developers implement agile development practices in a single database. With Gitora 6, developers can work on the same code base (packages, procedures etc...) at the same time, in the same database. Learn more at http://blog.gitora.com/introducing-gitora-6/
We are very excited to announce that Gitora 5 is now available for download. Gitora 5 is a huge step forward for version management of database objects. Gitora 5 has many new features. Below are just six of our favorites: A Brand New User Interface and Application One Gitora Installation to Manage Any Number of Databases Gitora Now Manages Tables No-login development experience A Comprehensive Developer Privileges Management Module Full API To Completely Automate Your Workflow Let’s go over these new features briefly: A Brand New User Interface and Application We redesigned every screen in Gitora from the ground up. The new design gives Gitora 5 a beautiful modern look with large components, easy to read, fresh colors and updated icons. We also rebuilt the application with Java. This reduced Gitora’s database footprint by more than 95% making it much easier to install and manage. One Gitora Installation to Manage Any Number of Databases This was pr
Gitora is a version control tool for the Oracle Database. It helps DBA's, developers to manage their database code and objects using Git and enables them to use modern software development workflows. Attend the webinar by Plexxis to learn how they are using Gitora to improve their software development process. Click here to register.