Reputation: 121
I want to implement continuous integration for database changes. I want to know how to do that and what are the activities we have to do as part of CI for db(eg: create db/execute scripts/xx).
CI: Jenkins DB: SQL Server
I dont want to use any tool like RedGate... Let me know your thoughts.
Thanks
Upvotes: 6
Views: 6677
Reputation: 61
In order to have database in the CI processes, you must rely on the deployment automation. The automation consists of two phases:
Generating the script – and I hope you agree that should not be done manually.
Executing and keeping track of the script.
The 1st phase is critical, if you generate wrong the script and execute it, you'll have garbage-in garbage-out.
In my opinion, the 1st phase requires having a baseline aware analysis, which compare source, to target, to baseline. A baseline is a label you tagged before you made the changes and it helps you to identify changes that you want to deploy, changes that are made to protect the target (for example, an index that was added to production for a critical fix) and conflicts that you need to merge (for example, a procedure that was changed in development and also in production – other lines of code)
Upvotes: 0
Reputation: 5836
A nice tool that can track and maintain change sets of your DB schema is Liquibase. A friendly Apache 2.0 license, multiple formats support for storing the change sets in your VCS, a possibility to generate HTML documentation with a summary of changes and couple of other features makes this a nice match. I am currently using this tool in several projects quite effectively, good stuff...
Upvotes: 5