When you build your database project, it compares the existing schema of the deployed database with the schema in the project and generates the necessary deployment script to make the live db match the project. [By default, the script is created in a "sql" subfolder of the project.] Therefore, when you make a change to a sproc, view, or function in your project, VS will actually generate an ALTER statement in the deployment script to bring the objects up to speed (i.e., rather than a CREATE statement). Therefore, that scenario should already be handled for you. Please let me know if it is not updating the objects.
As for ignoring users, this is an interesting scenario. I assume you do not want the users tracked in the database project because you do not want to deploy them (as you mentioned, different users exist in each environment). Is this the case If so, you can create the users in each environment and make sure to uncheck the box next to build property "Generate DROP statements that are in the target database but are not in the database project". This will keep VS from dropping the users it does not find in the project on deployment. Of course, you can always customize the generated SQL script and pre/post deployment scripts as well.
Thanks for your questions!
-Jon
|