Prevent user from committing other user's changes
One of the problems with a shared db model, where all developers work against the same database, is that everyone's changes are listed on the Commit List and any user can commit any other user's changes. It would be nice if an administrator setting could be set that would only allow users to commit their own changes There should be someway to prevent other users from committing your changes.
An update for users on the status of this suggestion:
An ‘object locking’ feature was added to SQL Source Control following the creation of this item which can helps users working in a shared database environment not write over each other’s changes.
This may help prevent accidental commits in some cases, as there is a “Locking” tab which allows users to see which other users are working on specific items.
Locked items are still eligible to be committed, however, and there are cases where users will want to commit an item — perhaps to a specific branch in source control which is not ready to deploy — even if the item in the database is locked.
We have found at Redgate that the easiest way to enable alignment with distributed source control systems such as Git is to empower users to use dedicated development databases rather than shared databases. Tools such as SQL Clone support this. With dedicated databases, each developer can have the version of objects which they need without worrying about whether someone else is changing things in the same database at the same time.
-
Scott Paist commented
Or even just a way to filter out changes made by someone else.
-
Mary Hamlin commented
Completely agree. We have a lot of sloppy developers who will most likely just check in everything when committing instead of selecting only the items that they changed themselves, potentially checking in objects that aren't ready for deployment yet. I think this is a big flaw in SSC at the moment. Also, on a related note, it would be nice if you could right-click on an object and commit the changes for just that object (which could help to alleviate some of the problems with accidental check-ins), or at a minimum have the object that you right-clicked show up as checked in the commit tab.
-
Sam commented
Completely agree. It would also be helpful if you didn't have to be an administrator to see who made changes. Right now, "Changed By" is populated with unknowns with no hopes of every receiving "Admin" rights.