10 votesDan W commented
I think this is a great idea! That would add so much freedom to let SQL Source Control do it's thing while I go about my work!
5 votesDan W commented
I have an implementation option to recommend. In keeping with the rest of the error handling, simply put the IF @@ERROR <> 0 SET NOEXEC ON after the USE [my_database] statement in the synchronization script, such as:
IF @@ERROR <> 0 SET NOEXEC ON
This doesn't protect against scripts from being run against the right database on the wrong server, but it at least it prevents scripts from being applied if the change to the expected target database fails.