What’s coming up?
ApexSQL Source Control is a tool for managing Source control in SQL Server as an add-in in SSMS. The source control engine we used is shared across other products e.g. ApexSQL Diff, ApexSQL Script, ApexSQL Build so that these tools can treat source control projects as data sources and compare to a database, synchronize with a production database, build a database from a source control project etc.
Although we think ApexSQL Source Control is a great start, we want to make a ton of improvements over the next few months. Our basic approach is to allow the user to choose a development model (dedicated or shared) that suits him best and then ApexSQL Source Control integration into SSMS will be customized based on that choice. We are going to add support for new systems as well as improve existing engines. We will put a lot of effort into improving design and usability. Once we complete work on the dedicated development model, we‘ll concentrate on the shared database development model and anything that is currently missing in ApexSQL Source Control support for it, so that at the end we have a tool that can fulfill all the needs of a team, small or large, who’s everyday tasks revolve around database development and versioning. For more specifics, please read on…
Dedicated database development model
Dedicated database development model implies that each developer works on his local database and commits changes to a central Source control server. This implies that the developer can experiment, test or drop the entire database without fear that he will break something up. Once he is done, he can just get the latest version from the Source control server and everything is back and running.
We are not trying to say that the shared development model is a bad one – it just cannot cope with the reality of developing a database in a team that is bigger than 2-3 people. Imagine a situation in which 10 developers make changes to a single database concurrently. If the communication between them is not perfect, there is a big chance that something will go wrong soon. To put it simple – You cannot test and play with your designs in a shared development model environment, as all your changes immediately affect everybody else.
With a dedicated development model there is no more need for tapping your colleague on the shoulder and asking him if he is working on an object that is dependent on an object that you want to work on. You just start you work and run comparison at the end to see what has changed in the meantime. You are provided with complete information about changes being made and you can take proper merge actions in order to apply your changes to the master repository. One more thing, you do not even need an internet connection to work, as you can commit your changes later without fear that something is broken or overwritten.
How is it going to work in ApexSQL Source Control?
ApexSQL Source Control will monitor the changes between the database and source control by monitoring the list of object scripts that are representing the database’s current state and scripts that represent source control state. Once the user maps the database to a remote repository everything from the repo is downloaded to a local temp folder. ApexSQL Source Control engine will compare those two lists and provide the user with the list of changes (e.g. If the database is mapped for the first time, every object from the database will be presented with an option to commit it to the repository.)
This process is repeated each time when the user wants to synchronize his changes with the remote repository. Scripts from source control are compared with the local database scripts and changes are presented to the user in the Action center, so that he can take appropriate action. The user will be able to control if a specific change should be taken from remote or committed from local database, and he will be able to merge the conflicting changes with built-in or one of the most popular third-party comparison tools. The user will be provided with the option to undo the changes made to the database, on individual objects or the whole database, by reverting to a latest version from Source control, or any of the previous ones. On the next picture, you can see how the Action center tab shows differences between local and remote objects:
One more important thing that we are introducing in the next release of ApexSQL Source Control is the complete integration with SSMS. This means that changes to the database will be monitored in real – time and that every change made will be automatically marked in the object explorer. Just by taking a look at the OE, a developer will be able to tell what objects are different from the last version in the Source control.
As we said previously, in ApexSQL Source Control 2015 R1 user will be able to see the differences between the objects immediately and to resolve conflicts by taking appropriate action.
Another picture of the Action center tab, this time when conflict appears:
What we are hoping to achieve here is that a database developer can be completely independent in his work, while still having a possibility to monitor his, and changes from others made in the meantime. This will provide him with a full control of the development process and provide a new level of transparency in team development.
What about the shared database development model?
We are not forgetting about the shared development model as it is an attractive development model, especially for small teams. As soon as we complete work on the support for the dedicated database development model (ApexSQL Source Control 2015 R2), we plan to return and polish our support for the shared development model. We plan to provide the user with the choice and to customize the environment, so that the ApexSQL Source Control can scale itself based on the choice. For example, in a shared database environment, ApexSQL Source Control will provide the user with the possibility to check out and lock the file (if the source control supports those commands) so that he is sure that he is the only one making changes to it in the given time. For the shared development model, ApexSQL Source Control will come with the improved tracking of changes made to the database, thus giving the user a more complete picture of the development process.
Support for all relevant Source control systems
We are committed to cover all relevant source control system and we have already implemented support for Git, Mercurial and Visual Studio Online while we are in the process of implementing Perforce. Our implementation for Subversion has been rewritten against newest SharpSVN libraries in order to boost performance and use features provided by them. One more interesting thing is going to be the functionality to map database to a local working folder, which can then be used as the repository for any third party Source control client (GitHub, TortoiseSVN…).
The road map
Beta version of ApexSQL Source Control 2015 R1 has been released in October 2014 and it contains the following functionalities:
- Full support for dedicated database development model
- Customized UI depending on the chosen model
- Conflict resolution using third party tools
- Full integration of ApexSQL Source Control in SSMS
- Real-time monitoring of changes made to database objects
Main version of ApexSQL Source Control 2015 R1 has been released on November 3, 2014 and it contains the following functionalities:
- Support for Git, Mercurial
- Support for Visual Studio Online
- Support for SVN and SVN+SSH connection protocols
- Support for HTTP, HTTPS and SSH connections
- Undo changes made to the database feature is implemented for dedicated database model
- Implemented work offline feature
- Improved Source Control wizard for more intuitive database linking to source controls
- Improved overall quality, performance and usability of the product
ApexSQL Source Control 2015 R2
- Filtering objects in Action center by type
- Filtering objects in Action center by owner
- Conflict resolution using integrated merge tool
- Easy differences navigation in merge window
- Added option to script changes with\without dependencies when applying them to the database
- Added option for obligatory comments with enlarged comment field in Action Center tab for dedicated database model
- The “Apply all to source control” operation is up to 200% faster when working with Git
- The “Refresh” operation is up to 700% faster when working with Subversion
- General improvements in quality, performance and usability
ApexSQL Source Control 2015 R3
- Support for Perforce
- Communication with source control repository using the Action center (Shared database)
- Support for Git and Mercurial source control systems for shared development model
- View detailed history of the source control project including commit information, changeset and individual object differences
- Development policies for shared development model databases
- Excluding individual objects from monitoring
- Edit objects from SQL Server Management Studio (Shared database)
- Prevent objects from being edited if locked\checked out (Shared database)
- Logging of changes made to the database schema
- Improved overall quality, performance and usability of the product
ApexSQL Source Control 2015 R4
- Support for source-controlling static data
- Support for migration scripts
- Excluding objects from monitoring by owner and type
- Working folder as repository for both database development models
- Improved overall quality, performance and usability of the product
ApexSQL Source Control 2015 R5
- CLI support for major source control systems
- Support for basic branching and merging
- Support for association with work item by ID
- Ability to place folders with scripts under source control
- Improved overall quality, performance and usability of the product
Please note that we have planned rapid release cycles after the beta version is out, so that we can respond to feedback and improvements proposed by users and beta testers. We are, as always, more than willing to work with the community in creating the best tool possible for the database versioning, so anyone interested can contact us at: satori@apexsql.com in order to provide their ideas and feedback or try the beta version. For this first planned release, ApexSQL Source Control 2015 R1, experiences and advice from anybody who is working in the dedicated development model environment and with the strong persuasion about the need for database versioning would be treated as pure gold.
November 3, 2014