Skip to content

Commit

Permalink
Remove deployment of the SQL Logins.
Browse files Browse the repository at this point in the history
  • Loading branch information
GillesTourreau committed Aug 27, 2024
1 parent b3b987c commit 62282bd
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,6 @@ public SqlServerDatabase Initialize(string packageName, string connectionString)

if (!this.IsInitialized)
{
if (!string.IsNullOrWhiteSpace(connectionStringBuilder.UserID))
{
server.Master.ExecuteNonQuery($@"
IF SUSER_ID ('{connectionStringBuilder.UserID}') IS NULL
CREATE LOGIN [{connectionStringBuilder.UserID}] WITH PASSWORD = '{connectionStringBuilder.Password}'");
}

database = server.DeployDacPackage(packageName, connectionStringBuilder.InitialCatalog);

this.IsInitialized = true;
Expand Down
1 change: 0 additions & 1 deletion src/UnitTests.Databases.SqlServer/SqlServerExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ public static SqlServerDatabase DeployDacPackage(this SqlServer server, string f
{
var options = new DacDeployOptions();
options.CreateNewDatabase = true;
options.ExcludeObjectTypes = [ObjectType.Logins];

var services = new DacServices(server.Master.ConnectionString);
services.Deploy(package, databaseName, true, options: options);
Expand Down

0 comments on commit 62282bd

Please sign in to comment.