Is the Pre-Deployment script (Script.PreDeployment.sql) the best place to put sql commands that create server level objects (specifically logins in my case)?
I need to create server logins for the database users in the project and this seems the only vaguely logical place to put them as everything else in the project structure (created from reversing our dev db) is database specific. I therefore just wanted to check where others store their server level commands when working with Visual Studio Database Projects.
Many Thanks.
Anything you need prior to deploying your database would be in that script.
In our case, we add logins in the post deployment script. They are not needed when we deploy the database, and we decided to put all the security related commands in the same place.
Here is the Pre and Post deployment reference.