1
0
mirror of https://github.com/bitwarden/server.git synced 2024-12-21 16:47:35 +01:00

BRE-311 Fix the MsSqlMigratorUtility failing silently (#5134)

This commit is contained in:
Michał Chęciński 2024-12-10 15:30:34 +01:00 committed by GitHub
parent 127f1fd34d
commit 9e860104f2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -9,7 +9,7 @@ internal class Program
}
[DefaultCommand]
public void Execute(
public int Execute(
[Operand(Description = "Database connection string")]
string databaseConnectionString,
[Option('r', "repeatable", Description = "Mark scripts as repeatable")]
@ -20,7 +20,11 @@ internal class Program
bool dryRun = false,
[Option("no-transaction", Description = "Run without adding transaction per script or all scripts")]
bool noTransactionMigration = false
) => MigrateDatabase(databaseConnectionString, repeatable, folderName, dryRun, noTransactionMigration);
)
{
return MigrateDatabase(databaseConnectionString, repeatable, folderName, dryRun, noTransactionMigration) ? 0 : -1;
}
private static bool MigrateDatabase(string databaseConnectionString,
bool repeatable = false, string folderName = "", bool dryRun = false, bool noTransactionMigration = false)