In this article, I will be sharing with you my experience with the Version control Process to manage your entire projects. This applies to all the products you work in implementation projects and its essential and important.
About Version Control
Version Control gives a consultant especially one thing: safety. If your code is version controlled, you don’t risk to lose things you did in the past, you don’t need to fear breaking something terribly (just go back), you don’t have to be afraid to forget why a change was made (you can always compare with how it was before) and you can learn from bugs and errors because you can find out where and when exactly the wrong code went into the code base in project. You are able to code in a much more comfortable zone than without.
Of course Version Control provides much more than that (think about automated documentation and release notes for example), but I think this is one of the strongest arguments to use Version Control – always and everywhere. You want to make your coding zone as safe and comfortable as possible, because uncertainty and fear are among the strongest killers of focus and creativity (which in my opinion are the most important attributes for a productive developer).
But what exactly is Version control, let’s find out. (Simple understanding flow)
Version control is a system that records changes to a file or set of files over time so that you can recall specific versions later.
Benefits of Using a Version Control System
The main advantages of using a version control system include streamlining the development process, management of code for multiple environments and keeping a history of all changes within a code.
A version control software saves all the changes in a repository. Hence, if the developers make a mistake, they can undo it. At the same time, they can compare the new code with a previous version(s) to resolve their grievance. This can reduce human errors and unintended consequences to a great extent
How to start?
One of the biggest up-front challenges to start version controlling your database sources is the question how to get them into text files. We database developers are not that comfortable with text files holding sources – we have our database, our query tool and our favorite IDE.
And yes, there are some solutions available which enable you to version control your sources without changing the way you work
- *Most commercial database IDEs have a function to (at least initially) write all your ddl to a file structure
- Visual Studio SQL Server Data Tools
- Notepad++ (Plugin SQL)
Another thing is that those tools won’t do everything for you. In my experience, working agile and clean is first of all a change in mindset and behavior (I’m pretty sure I will write more about that in future blog posts)
Database to file or file to database?
After having a tool to get the sources from database to file structure, it might be tempting to keep working directly on the database, maybe with some nice IDE and drag and drop and all that fancy stuff.
I don’t recommend this approach. Instead I encourage you to start working on the files and run them to bring the changes into the database.
Have your file with – for example – an Oracle Stored Procedure Body in your favourite text-editor (best-case with intellisense), edit it there and then run it against your development database
What to version control?
List of objects
Others like Documents, notes, YAML , XML .. etc.
When to start?
How to Automate?
- Git Repo and commands
- Jenkins Pipelines
Resource for learning more