Historical view

Applies to
ApexSQL Source Control

This article explains how to see project and single object history, and how to apply one of previous versions in ApexSQL Source Control.

Every source control system keeps track of the history of committed objects or object changes. From ApexSQL Source Control a user can see that history and even to get some of previous versions without a need for third party clients.

There are two approaches to history in ApexSQL Source Control:

  1. Project history – it can be accessed from linked database context menu in Object explorer pane

    Project history

  2. Object history – it can be accessed from selected object context menu in Object explorer pane

    Object history

Both approaches use the same form:

Project and Object history approaches are using the same form

It shows every single object or batch commit as one changeset with its own version number. Changesets contain object(s) with action that is performed (added, edited, and deleted).

The difference between those two approaches is that a project history shows all changesets while object history shows only changesets which contain chosen object (e.g. Person.Address). Object history shows changesets including all containing objects, but the SQL script for other objects from the changeset is not available:

The difference between two approaches

The SQL script of a selected object from one changeset is shown on right side of difference window. It can be compared with its state from any other changesets including database (current) version:

The difference window

Clicking the Get button, specific version of an object can be applied showing the sequence, script and warnings (if any exist):

Apply changes window

Quick tip icon

Quick tip:

If the selected version of an object is the same as the one in a database, a notification message appears, saying that there is nothing to sync.

Historical view FAQs

Q: Can I apply all changes from a single changeset?

A: Currently, the Get operation can be performed only against a single object from the changeset.

Q: What is the difference between getting specific version from history and Get by label?

A: Getting specific version from history can be done only for single object at once, while the Get by label operation will apply all changes from selected label regardless on number of objects in it.

Q: Can I perform Get if some database development policy is active?

A: Depending of active policy, selected object must be checked out or locked before Get from history is performed.

Q: If an object is checked out or locked by someone else, can I Get one of previous versions of it?

A: If an object is locked by one user, other users cannot perform the Get operation. However, if an object is checked out, currently other users can perform the Get operation, but from ApexSQL Source Control 2016 R1, a notification message will be implemented that the object is checked out with an option to perform the Get operation or to cancel it. The user who locked an object can get any previous version of an object and apply it.

Q: Does history stores all changes made on some database or only committed ones?

A: History stores only committed changes. To keep all changes made on a database in shared development model, the Logging feature should be enabled.

Q: If I perform the Get operation, will the change be applied to both database and source control?

A: No, the change will be applied only on database, and can be committed to the repository through the Action center tab.