Feature Request: store user default schema
meyerovb
Posts: 21
I create a user, it stores the username and owned roles (db_owner), but it doesnt store the default schema, which is important in my case.
Comments
The default schema should be scripted for the database level users. For example, if you create:
This will be added to the repository.
How are you creating the user?
Create DB2, create User1 with no default schema, link to DB1 source control directory, get latest. Schema1 is created, but User1 is not set to default schema Schema1.
Unfortunately, the default_schema setting is a user property that is automatically ignored by SQL Source Control. SQL Source control uses our SQL Compare engine to compare the differences between the live database and what's stored in Source Control. It's a default option in SQL Compare to ignore the 'user properties' and SQL source control uses the default SQL Compare options. We have an open feature request to allow the user to configure the SQL Compare engine options, which you might like to vote for here
Currently the only workarounds I can think of are:
1) Delete user1 from DB2 and then 'get' the complete user from source control.
2) Use SQL Compare to deploy the user from Source Control to the database, and turn off the option: 'ignore' > 'user properties'
I hope this helps explain.
Let me know if you need any more information.