27. January 2017 16:23
We are pleased to announcing the release of our product OneScript! It automates the building of a SQL release script from individual SQL change scripts. This allows you to include database changes as a part of your continuous integration process.
Who is this for? Developers that work on applications where the contents of the database needs to be preserved. It is simple to use and integrates seamlessly into the development process. Developers continue to use the tools and practices that they already use.
It works by following these steps:
- Developers script out each database change during a development cycle and check them into source control (Examples: SVN – Subversion, TFS – Team Foundation Server.)
- The change scripts are each checked into different folders based on the type of database object that they change. Example folder names are: Tables, Views, Store Procs, Static Data, etc.
- Within OneScript (one-time setup) each folder name is assigned a sort order. So something like Tables = 100, Functions = 200, Views = 300, Store Procs = 400, etc.
- For a release a filter is defined. The logic usually takes the form of “scripts changed since a given date/time” or “include every change since the branch was created” (if you use branches.)
- Optionally, at the individual file level you can override its normal sort order or filter.
- When it does a build it will filter, sort and combine all of the individual change scripts into a single release script. You can do a build from the command-line!
We built OneScript because we have tried many other approaches including:
- Keep a single big change script in source control that the developers keep adding to for a release.
- Give change script files a name that starts with the next available number (0044_, 0045_, etc.) so they are combined in order into single release script at build time.
- Do a “diff” between Development and Production databases and then script out the differences. Then hand edit it to remove anything not wanted. Separately, add our static data scripts.
- Email change scripts to the tech lead.
Each one of these approaches suffered from one or more of the following problems:
- Quickly becomes unmanageable.
- Last one in wins for changes to the same object.
- Conflicts are hidden until release time.
- Undoing a change is a manual and tedious process.
- No history or auditability of changes.
- Doesn’t lend itself to automation.
To learn more visit our site http://www.OneScript.com