Skip to content

Commit

Permalink
Cleanup. Fix SQL file.
Browse files Browse the repository at this point in the history
  • Loading branch information
onikolaiev committed Jul 11, 2023
1 parent 4d2e3b8 commit f0e0d4f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 0 additions & 5 deletions d365fo.tools/functions/import-d365bacpac.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -252,11 +252,6 @@ function Import-D365Bacpac {
return
}

if($DatabaseName.Contains("-"))
{
$DatabaseName = $DatabaseName.Replace("-","_")
}

if ($PSBoundParameters.ContainsKey("CustomSqlFile")) {
if (-not (Test-PathExists -Path $CustomSqlFile -Type Leaf)) {
return
Expand Down
2 changes: 1 addition & 1 deletion d365fo.tools/internal/sql/set-bacpacvaluessql.sql
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ END

IF EXISTS (SELECT * FROM sys.syslogins WHERE NAME = 'axdbadmin')
BEGIN
ALTER AUTHORIZATION ON database::@DATABASENAME TO sa
ALTER AUTHORIZATION ON database::[@DATABASENAME] TO sa

CREATE USER axdbadmin FROM LOGIN axdbadmin
EXEC sp_addrolemember 'db_owner', 'axdbadmin'
Expand Down

0 comments on commit f0e0d4f

Please sign in to comment.