We are using visual studio database projects to define our databases and deploy them.
CREATE LOGIN [My_User]
CREATE USER [MY_User] FOR LOGIN [My_User] WITH DEFAULT_SCHEMA=[dbo]
And it works fine when deploying locally. But when deploying on the server, with OctopusDeploy, it causes the following error:
*** The object [My_User] already exists in database with a different definition and will not be altered."
This might not be a problem because the resulting user does work. But it's a major red flag and we'd rather not have any errors or warnings.