Skip to content

Commit

Permalink
BRE-311 Fix the MsSqlMigratorUtility failing silently (#5134)
Browse files Browse the repository at this point in the history
(cherry picked from commit 9e86010)
  • Loading branch information
michalchecinski authored and vgrassia committed Dec 10, 2024
1 parent 00b790d commit cfb75ae
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions util/MsSqlMigratorUtility/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ private static int Main(string[] args)
}

[DefaultCommand]
public void Execute(
public int Execute(
[Operand(Description = "Database connection string")]
string databaseConnectionString,
[Option('r', "repeatable", Description = "Mark scripts as repeatable")]
Expand All @@ -20,7 +20,11 @@ public void Execute(
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)
Expand Down

0 comments on commit cfb75ae

Please sign in to comment.