What’s next in ApexSQL Source Control

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:

Action center tab showing 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:

Action center tab - conflicts

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:

  1. Full support for dedicated database development model
  2. Customized UI depending on the chosen model
  3. Conflict resolution using third party tools
  4. Full integration of ApexSQL Source Control in SSMS
  5. 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:

  1. Support for Git, Mercurial
  2. Support for Visual Studio Online
  3. Support for SVN and SVN+SSH connection protocols
  4. Support for HTTP, HTTPS and SSH connections
  5. Undo changes made to the database feature is implemented for dedicated database model
  6. Implemented work offline feature
  7. Improved Source Control wizard for more intuitive database linking to source controls
  8. Improved overall quality, performance and usability of the product

ApexSQL Source Control 2015 R2

  1. Filtering objects in Action center by type
  2. Filtering objects in Action center by owner
  3. Conflict resolution using integrated merge tool
  4. Easy differences navigation in merge window
  5. Added option to script changes with\without dependencies when applying them to the database
  6. Added option for obligatory comments with enlarged comment field in Action Center tab for dedicated database model
  7. The “Apply all to source control” operation is up to 200% faster when working with Git
  8. The “Refresh” operation is up to 700% faster when working with Subversion
  9. General improvements in quality, performance and usability

ApexSQL Source Control 2015 R3

  1. Support for Perforce
  2. Communication with source control repository using the Action center (Shared database)
  3. Support for Git and Mercurial source control systems for shared development model
  4. View detailed history of the source control project including commit information, changeset and individual object differences
  5. Development policies for shared development model databases
  6. Excluding individual objects from monitoring
  7. Edit objects from SQL Server Management Studio (Shared database)
  8. Prevent objects from being edited if locked\checked out (Shared database)
  9. Logging of changes made to the database schema
  10. Improved overall quality, performance and usability of the product

ApexSQL Source Control 2015 R4

  1. Support for source-controlling static data
  2. Support for migration scripts
  3. Excluding objects from monitoring by owner and type
  4. Working folder as repository for both database development models
  5. Improved overall quality, performance and usability of the product

ApexSQL Source Control 2015 R5

  1. CLI support for major source control systems
  2. Support for basic branching and merging
  3. Support for association with work item by ID
  4. Ability to place folders with scripts under source control
  5. 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