Undo a change
Published 16 July 2015
You can undo changes that aren't committed to source control yet.
- In the Object Explorer, right-click the object, folder, or database with changes you want to undo, select Other SQL Source Control tasks > Undo changes.
Alternatively, right-click an object on the Commit tab, and click Undo changes.
The Undo changes dialog box opens:
- Select the objects with changes you want to undo and click Undo Changes.
A progress dialog box is displayed while SQL Source Control runs the script to undo the changes. - When the undo is complete, close the dialog box.
Changes you can't undo
The most common types of change SQL Source Control can't undo are:
Committed changes
You can only use SQL Source Control to undo changes you haven't committed.
To undo changes that have been committed, use SQL Server Management Studio Integration Pack to update the database to a specific version, or use your source control system.
Static data changes
You can't undo a data link or a data edit.
To stop source-controlling a table's data, right-click it in the object explorer and click Link/Unlink Static Data. In the Link/Unlink Static Data dialog box, you can choose to stop source controlling the table's data.
Dropped data
If you drop a table or column that contained data, the data isn't restored when you undo the drop.
NOT NULL columns
If you drop a NOT NULL column from a table that contained data, undoing the drop will fail if the column doesn't have a default value.