Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8f0501b
commit 351b804
Showing
1 changed file
with
21 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,29 @@ | ||
USE master; | ||
if not exists (select name from sys.syslogins where name = 'nextauth') | ||
USE master; | ||
/* did you tear down the container ? */ | ||
if not exists (select name | ||
from sys.syslogins | ||
where name = 'nextauth') | ||
CREATE LOGIN nextauth | ||
WITH PASSWORD = 'password', | ||
CHECK_POLICY = OFF; | ||
GO | ||
if not exists (select name from sys.databases where name = 'nextauth' ) | ||
/* did you tear down the container ? */ | ||
if not exists (select name | ||
from sys.databases | ||
where name = 'nextauth' ) | ||
CREATE database nextauth | ||
GO | ||
USE nextauth; | ||
if not exists(select [name] from sys.sysusers where name= 'nextauth') | ||
CREATE USER nextauth FOR LOGIN nextauth | ||
/* did you tear down the container ? */ | ||
if not exists(select [name] | ||
from sys.sysusers | ||
where name= 'nextauth') | ||
CREATE USER nextauth | ||
WITH DEFAULT_SCHEMA =[dbo]; | ||
GO | ||
EXEC sp_addrolemember 'db_owner', 'nextauth' | ||
/* | ||
* Adding user as sysadmin, | ||
* So you can easily drop/create/re-create/alter the database | ||
* You will need to login to 'master' to do that | ||
*/ | ||
exec sp_addsrvrolemember @loginame = N'nextauth', @rolename = N'sysadmin' | ||
|
351b804
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: