-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from drwatson1/net6
Support of .Net 6
- Loading branch information
Showing
12 changed files
with
67 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/dbup-cli.integration-tests/Scripts/PostgreSql/Timeout/001.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
SELECT pg_sleep(60); | ||
SELECT pg_sleep(60); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/dbup-cli.integration-tests/dbup-cli.integration-tests.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
using Optional; | ||
using System; | ||
|
||
namespace DbUp.Cli | ||
{ | ||
internal class ResultBuilder | ||
{ | ||
public Option<int, Error> FromUpgradeResult(Engine.DatabaseUpgradeResult result) | ||
{ | ||
if (result == null) | ||
{ | ||
throw new ArgumentNullException(nameof(result)); | ||
} | ||
|
||
if (result.Successful) | ||
{ | ||
return Option.Some<int, Error>(0); | ||
} | ||
|
||
var msg = "Failed to perform upgrade: "; | ||
if (result.Error == null) | ||
{ | ||
msg += "Undefined error"; | ||
} | ||
else | ||
{ | ||
msg += result.Error.Message; | ||
if (result.Error.InnerException != null) | ||
{ | ||
msg += $"{Environment.NewLine} Details: {result.Error.InnerException.Message}"; | ||
} | ||
} | ||
if (result.ErrorScript != null) | ||
{ | ||
msg += $"{Environment.NewLine} Script: {result.ErrorScript.Name}"; | ||
} | ||
|
||
return Option.None<int, Error>(Error.Create(msg)); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters