Here's how to reproduce the issue:
- Link a db to svn using red gate source control.
- Create a new user (e.g. test_user) and add it to the db_owner role for the vc'ed db.
- Commit the role change for db_owner but leave the user.
- Right-click the db and choose schema compare/deploy and set the db as both source and target. (I know it doesn't make sense to deploy to the same db but bear with me, it's just for the sake of reproducing the problem.)
- Change source to source to source control and pick the revision where you just commited a role change.
- Launch sql compare and click ok to do the comparison.
There will now be the following statement in the comparison window:
- Code: Select all
CREATE SCHEMA [test_user]
This user can also be seen as unmapped in the owner mapping window.
The only way to get rid of the create-schema-statement, afaik, is to also commit the actual user and then redo the comparison.
Am i missing something here or is this a bug?