Fix bug with role members and schemas
I filter out database users in my source control, because I do not want them accidentally deployed to another environment (may not be consistent across all environments). However, I do source control database roles, as many required permission sets are maintained through these roles. However:
1. Currently it is not possible to check in a database role without also adding the role membership. This should be a configurable option.
2. When using SQL Compare to deploy from source control, each user that is a member of a source controlled database role shows up as a "Schema" not present in the target database
AdminJames Billings (Admin, Red Gate) commented
SQL Compare has an option to Ignore users' permissions and role memberships which, according to the tooltip does this:
"When role-based security is used, object permissions are assigned to roles, not users. If this option is selected, SQL Compare compares and deploys object permissions only for roles, and members of roles that are roles. Users' permissions and role memberships are ignored".
Does that option help at all? If it does, you can set it in SQL Source Control as described here: http://documentation.red-gate.com/display/SOC3/Setting+SQL+Compare+options+in+SQL+Source+Control