Option to perform a push or pull synchronization from your project/solution.
When performing a synchronization it would be nice to be able to select whether you want to push project to local db or pull local db to project. Basically need the ability to refresh/synchronize your local code with a version from Source Control.
1) Get Latest from Source Control in Solution.
2) Select synchronize, user presented with option to refresh database or project.
3) Based on user selection in #2. Push differences to dev DB or pull differences into the project while checking out the necessary files and such.
This may be where SQL Source Control comes into play but the integration would be nice.
We now have a better workaround for this (that uses SQL Compare Pro).
You can launch SQL Compare by right clicking the project node in the solution explorer. This will load SQL Compare with your project as the source and the database it’s connected to as your target.
As ever, feedback very welcome.
AdminPaul Stephenson (Admin, Red Gate) commented
Marty, I've removed the Under Review status. The workaround still exists for those who do already have a copy of SQL Compare Pro.
Michael would you be willing to remove the Under Review setting on this user voice item (probably some others related). Per email below this is not something RedGate is interested in providing to enterprise customers. I did a complete user session and demonstrated that there was no way to refresh (overwrite) your local database with a one way push from SQL Connect (without sql compare). The requirement for SQL Compare pro effectively increases the price of SQL Connect from $300 usd per dev to $700 usd per dev.
Per Paul Stephenson
"Although your idea made quite a lot of sense to me, I’m afraid that we didn’t get any other requests for this specific feature, especially since there is a workaround for those who have SQL Compare. We have since diverted our attention onto support for Visual Studio (SSDT) database projects, so that SQL Connect and Red Gate’s other tools can interoperate better with Microsoft, and you don’t have to choose one format or the other.
The hope is that if you start using SSDT-format projects then you will be able to use SQL Compare and SQL Source Control to help with their development and deployment. SQL Connect can already create its own projects from SSDT projects, which adds connected development to the base SSDT features."
Yes it does require SQL Compare (Professional edition). We know that's going to be the case for some teams, so realise this is only a workaround for people with SQL Compare already. Thanks for confirming though.
Thanks for the update Michael. Does this require a licensed install of SQL Compare? Unfortunately, our developers don't hold licenses to SQL Compare if that is the case.
Here's a scenario for us where sql connect synchronize causes us issues (which is part of why we cannot adopt it yet).
There are two developers working on 1 shared database. The developers are working on two separate branches of code - (at this time in our integrated environment it is not possible for us to create/copy unique development databases per branch).
Developer 1 is working on an object in the database, coding, deploying to the db, and testing but has not yet checked in these changes. Meanwhile, developer 2 wants to start making and testing changes to an unrelated object in the same database. So they synchronize their project version. Now, developer 2 has code that is unfinished (not checked in) from a separate branch of code in their project. If they proceed to check in their changes, this partially finished object from another branch will be a part of their changeset. Later this may also cause needless merge conflicts.
Allowing the synchronize to have an interface like sql compare when synchronizing differences would allow us to prevent this situation.
Fredrik Haglund commented
I'm not sure how you internally are detecting in wich direction changes should flow but consider all special scenarios with branching, merging, rollback, undo and parallel developing. It is very probable your detection is going to make the wrong asumptions now and then so it is better to turn over control to the developer.
This behavior has annoyed in me SQL Source Control a few times too when It wants to synchronize in the wrong direction. Then you have to struggle to figure out how to get in sync manually?
Synchronice probably works in most cases but we must have a simple way to override as Marty U points out.
Michael to be even more clear I would think the process could work as such:
1) Get latest.
2) Right click project and select "Perform Compare".
3) Present user with the objects that are different and allow them to select import change or apply latest version on the individual objects. You could also have a button that allows a user to Apply latest version to all objects or import all objects.
This way you can pick and choose what you want to refresh from Source Control or what changes you have been working on in the dev database that you want to get into the project and source control.
Basically perform a normal SQL Compare but instead have the option of doing it either from project to DB or DB to Project.
Thanks Michael. But from what I can tell if I get latest and update the project and then perform a synchronize, if there are any differences it checks out the files in my project and pulls in the differences from my local dev database into the project. Granted that is also a functionality that I think is key but to be honest it should be a two way synchronization and the ability to select which objects you want to synchronize.