Skip to content

Commit

Permalink
[PM-294] Add Database to MSSQL Environment File (#2962)
Browse files Browse the repository at this point in the history
  • Loading branch information
vgrassia authored May 25, 2023
1 parent 0bdc4c3 commit b55d086
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions util/MsSql/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ fi
# Replace database name in backup-db.sql
if [ ! -z "$DATABASE" ]
then
sed -i -e "/@DatabaseName /s/vault/$DATABASE/" backup-db.sql
sed -i -e "/@DatabaseNameSafe /s/vault/${DATABASE// /-}/" backup-db.sql
sed -i "/^SET @DatabaseName =/s/'[^']*'/'$DATABASE'/" backup-db.sql
sed -i "/^SET @DatabaseNameSafe =/s/'[^']*'/'${DATABASE// /-}'/" backup-db.sql
fi

# The rest...
Expand Down
1 change: 1 addition & 0 deletions util/Setup/EnvironmentFileBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ private void Init()
_mssqlOverrideValues = new Dictionary<string, string>
{
["SA_PASSWORD"] = dbPassword,
["DATABASE"] = _context.Install?.Database ?? "vault"
};

_keyConnectorOverrideValues = new Dictionary<string, string>
Expand Down

0 comments on commit b55d086

Please sign in to comment.