1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-21 12:05:42 +01:00

[PM-294] Add Database to MSSQL Environment File (#2962)

This commit is contained in:
Vince Grassia 2023-05-25 16:57:47 -04:00 committed by GitHub
parent 0bdc4c3902
commit b55d086c9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -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...

View File

@ -104,6 +104,7 @@ public class EnvironmentFileBuilder
_mssqlOverrideValues = new Dictionary<string, string>
{
["SA_PASSWORD"] = dbPassword,
["DATABASE"] = _context.Install?.Database ?? "vault"
};
_keyConnectorOverrideValues = new Dictionary<string, string>