Undo data changes
I can undo any DDL operation but I don't have the option to undo a data change in a source controlled table. I think data changes should also be in the list of changes I can undo.
While SQL Source Control does not currently provide a simple way to right click and ‘Undo’ static data changes on the ‘Commit’ screen as suggested, there is a workaround which may help some users.
If you wish to revert the static data in the table to a previous version which you have committed, you can do this by viewing the history of commits for the object in SQL Source Control, and then launching SQL Data Compare to update the database.
Please note that this workaround requires a license for Data Compare. More detail on how to do this are here: https://documentation.red-gate.com/soc/common-tasks/update-to-a-revision-from-source-control
-
DanCaveman commented
This is a very expensive tool. The whole purpose is to use the database like you do source code. Not being able to undo is crucial. It wastes so much time to have to unlink and re-link. Even just refreshing the Get Latest or Commit takes a long time.
If it can do it properly when I link the database to source control, why can't it update my data properly on command?
-
Tom Moonen commented
Just simple: for all tables which are not static data, clean it and reset also the seed for identity column without any side effect that the schema has changed.
-
Rob commented
This along with no migration scripts for git are becoming a deal breaker for us.
-
John Q Martin commented
We just hit this issue today and it is rather confusing that you cannot undo a data change.
-
TechTank commented
I too am finding this a bit hard to fathom.
-
dazziep commented
yep bit of a pain :(
-
Franz Junge commented
Not much of source control tool if you can't undo stuff !
-
Edafe Onerhime commented
This is also a major issue for us.