Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BRE-311 Fix the MsSqlMigratorUtility failing silently #5134

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading