From 6b43b01f7201397504255e9e976dfe37992f46b8 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Tue, 5 Mar 2024 12:09:38 +0100 Subject: [PATCH 01/10] Fix DELIMITER handling --- src/dbup-oracle/OracleCommandReader.cs | 3 ++- src/dbup-oracle/OracleCustomDelimiterCommandReader.cs | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/dbup-oracle/OracleCommandReader.cs b/src/dbup-oracle/OracleCommandReader.cs index ffa686c..41e2750 100644 --- a/src/dbup-oracle/OracleCommandReader.cs +++ b/src/dbup-oracle/OracleCommandReader.cs @@ -20,7 +20,8 @@ public class OracleCommandReader : SqlCommandReader /// Hook to support custom statements /// protected override bool IsCustomStatement => TryPeek(DelimiterKeyword.Length, out var statement) && - string.Equals(DelimiterKeyword, statement, StringComparison.OrdinalIgnoreCase); + string.Equals(DelimiterKeyword, statement, StringComparison.OrdinalIgnoreCase) && + string.IsNullOrEmpty(GetCurrentCommandTextFromBuffer()); /// /// Read a custom statement diff --git a/src/dbup-oracle/OracleCustomDelimiterCommandReader.cs b/src/dbup-oracle/OracleCustomDelimiterCommandReader.cs index d2278a1..cfc1d33 100644 --- a/src/dbup-oracle/OracleCustomDelimiterCommandReader.cs +++ b/src/dbup-oracle/OracleCustomDelimiterCommandReader.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Text; using DbUp.Support; @@ -20,7 +20,8 @@ public OracleCustomDelimiterCommandReader(string sqlText, char delimiter) : base /// protected override bool IsCustomStatement => TryPeek(DelimiterKeyword.Length - 1, out var statement) && - string.Equals(DelimiterKeyword, CurrentChar + statement, StringComparison.OrdinalIgnoreCase); + string.Equals(DelimiterKeyword, CurrentChar + statement, StringComparison.OrdinalIgnoreCase) && + string.IsNullOrEmpty(GetCurrentCommandTextFromBuffer()); /// /// Read a custom statement From 51af5290ab8ba94ed3b9db4cd481d0c6878c81f6 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Fri, 15 Mar 2024 08:39:10 +0100 Subject: [PATCH 02/10] Update core package --- src/dbup-oracle/dbup-oracle.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dbup-oracle/dbup-oracle.csproj b/src/dbup-oracle/dbup-oracle.csproj index bbaeceb..4d95e3a 100644 --- a/src/dbup-oracle/dbup-oracle.csproj +++ b/src/dbup-oracle/dbup-oracle.csproj @@ -17,7 +17,7 @@ - + From d0cbc2568b0ef2aee745e940d4176ceaa6e4a5c3 Mon Sep 17 00:00:00 2001 From: Robert Wagner Date: Sat, 20 Jul 2024 11:53:14 +1000 Subject: [PATCH 03/10] Used new GHA workflows --- .github/workflows/main.yml | 73 ++------------------------- .github/workflows/publish-release.yml | 12 +++++ .github/workflows/test-report.yml | 12 +++++ 3 files changed, 28 insertions(+), 69 deletions(-) create mode 100644 .github/workflows/publish-release.yml create mode 100644 .github/workflows/test-report.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 18198a1..26798d9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,77 +2,12 @@ name: CI on: push: + branches: + - '**' # Ignores pushes of tags pull_request: workflow_dispatch: jobs: build: - runs-on: windows-latest # Use Ubuntu in v5.0 - - env: - DOTNET_NOLOGO: true - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true # Avoid pre-populating the NuGet package cache - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 # all - - - name: Setup .NET 2.0 # Remove in v5.0 - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 2.0.x - - - name: Setup .NET 8.0 - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.0.x - - - name: Install GitVersion - uses: gittools/actions/gitversion/setup@v0 - with: - versionSpec: '5.x' - - - name: Run GitVersion - id: gitversion - uses: gittools/actions/gitversion/execute@v0 - - - name: Display SemVer - run: | - echo "SemVer: $env:GitVersion_SemVer" - - - name: Add DbUp NuGet Source - run: dotnet nuget add source --name DbUp --username DbUp --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text https://nuget.pkg.github.com/DbUp/index.json - - - name: Restore - run: dotnet restore - working-directory: src - - - name: Build - run: dotnet build -c Release --no-restore /p:Version=$env:GitVersion_SemVer - working-directory: src - - - name: Test - run: dotnet test --no-build -c Release --logger trx --logger "console;verbosity=detailed" --results-directory ../artifacts - working-directory: src - - - name: Pack - run: dotnet pack --no-build -c Release -o ../artifacts /p:Version=$env:GitVersion_SemVer - working-directory: src - - - name: Push NuGet packages to GitHub Packages ⬆️ - working-directory: artifacts - run: dotnet nuget push *.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source "https://nuget.pkg.github.com/DbUp/index.json" - - - name: Push NuGet packages to NuGet ⬆️ - if: ${{ steps.gitversion.outputs.preReleaseLabel == '' }} - working-directory: artifacts - run: dotnet nuget push *.nupkg --api-key ${{ secrets.NUGET_APIKEY }} --source https://api.nuget.org/v3/index.json - - - name: Test Report 🧪 - uses: dorny/test-reporter@v1 - if: ${{ always() }} - with: - name: Tests - path: artifacts/*.trx - reporter: dotnet-trx + name: Build + uses: DbUp/Universe/.github/workflows/build.yml@main diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml new file mode 100644 index 0000000..eb5e03f --- /dev/null +++ b/.github/workflows/publish-release.yml @@ -0,0 +1,12 @@ +name: Publish DbUp Packages to NuGet + +on: + release: + types: [ published ] + workflow_dispatch: + +jobs: + publish: + name: Publish Package + uses: DbUp/Universe/.github/workflows/publish-release.yml@main + secrets: inherit diff --git a/.github/workflows/test-report.yml b/.github/workflows/test-report.yml new file mode 100644 index 0000000..e8c9f8f --- /dev/null +++ b/.github/workflows/test-report.yml @@ -0,0 +1,12 @@ +name: Test Report +run-name: Generate Test Report for run `${{ github.event.workflow_run.run_number }}` branch `${{ github.event.workflow_run.head_branch }}` + +on: + workflow_run: + workflows: ["CI", "build"] + types: [completed] + +jobs: + report: + name: Test Report 🧪 + uses: DbUp/Universe/.github/workflows/test-report.yml@main \ No newline at end of file From 16a456ced2c4c1b3a2fd5fa119f43734b99a9e0b Mon Sep 17 00:00:00 2001 From: Robert Wagner Date: Wed, 24 Jul 2024 14:53:21 +1000 Subject: [PATCH 04/10] Updated to DbUp 6 and only targeted netstandard2 --- ...portTests.VerifyBasicSupport.approved.txt} | 4 +- ...JournalCreationIfNameChanged.approved.txt} | 4 +- ....VerifyVariableSubstitutions.approved.txt} | 4 +- .../NoPublicApiChanges.Run.Net.verified.cs | 80 ------------------- ....cs => NoPublicApiChanges.Run.approved.cs} | 0 src/Tests/Tests.csproj | 10 +-- src/dbup-oracle.sln.DotSettings | 3 + src/dbup-oracle/OracleScriptExecutor.cs | 6 +- src/dbup-oracle/OracleTableJournal.cs | 4 +- src/dbup-oracle/dbup-oracle.csproj | 11 +-- 10 files changed, 21 insertions(+), 105 deletions(-) rename src/Tests/ApprovalFiles/{DatabaseSupportTests.VerifyBasicSupport.verified.txt => DatabaseSupportTests.VerifyBasicSupport.approved.txt} (94%) rename src/Tests/ApprovalFiles/{DatabaseSupportTests.VerifyJournalCreationIfNameChanged.verified.txt => DatabaseSupportTests.VerifyJournalCreationIfNameChanged.approved.txt} (94%) rename src/Tests/ApprovalFiles/{DatabaseSupportTests.VerifyVariableSubstitutions.verified.txt => DatabaseSupportTests.VerifyVariableSubstitutions.approved.txt} (94%) delete mode 100644 src/Tests/ApprovalFiles/NoPublicApiChanges.Run.Net.verified.cs rename src/Tests/ApprovalFiles/{NoPublicApiChanges.Run.DotNet.verified.cs => NoPublicApiChanges.Run.approved.cs} (100%) diff --git a/src/Tests/ApprovalFiles/DatabaseSupportTests.VerifyBasicSupport.verified.txt b/src/Tests/ApprovalFiles/DatabaseSupportTests.VerifyBasicSupport.approved.txt similarity index 94% rename from src/Tests/ApprovalFiles/DatabaseSupportTests.VerifyBasicSupport.verified.txt rename to src/Tests/ApprovalFiles/DatabaseSupportTests.VerifyBasicSupport.approved.txt index a413139..c931df0 100644 --- a/src/Tests/ApprovalFiles/DatabaseSupportTests.VerifyBasicSupport.verified.txt +++ b/src/Tests/ApprovalFiles/DatabaseSupportTests.VerifyBasicSupport.approved.txt @@ -1,11 +1,11 @@ DB Operation: Open connection Info: Beginning database upgrade -Info: Checking whether journal table exists.. +Info: Checking whether journal table exists DB Operation: Execute scalar command: select 1 from user_tables where table_name = 'SCHEMAVERSIONS' DB Operation: Dispose command Info: Journal table does not exist Info: Executing Database Server script 'Script0001.sql' -Info: Checking whether journal table exists.. +Info: Checking whether journal table exists DB Operation: Execute scalar command: select 1 from user_tables where table_name = 'SCHEMAVERSIONS' DB Operation: Dispose command Info: Creating the "schemaversions" table diff --git a/src/Tests/ApprovalFiles/DatabaseSupportTests.VerifyJournalCreationIfNameChanged.verified.txt b/src/Tests/ApprovalFiles/DatabaseSupportTests.VerifyJournalCreationIfNameChanged.approved.txt similarity index 94% rename from src/Tests/ApprovalFiles/DatabaseSupportTests.VerifyJournalCreationIfNameChanged.verified.txt rename to src/Tests/ApprovalFiles/DatabaseSupportTests.VerifyJournalCreationIfNameChanged.approved.txt index d7207b2..49d8aa4 100644 --- a/src/Tests/ApprovalFiles/DatabaseSupportTests.VerifyJournalCreationIfNameChanged.verified.txt +++ b/src/Tests/ApprovalFiles/DatabaseSupportTests.VerifyJournalCreationIfNameChanged.approved.txt @@ -1,11 +1,11 @@ DB Operation: Open connection Info: Beginning database upgrade -Info: Checking whether journal table exists.. +Info: Checking whether journal table exists DB Operation: Execute scalar command: select 1 from user_tables where table_name = 'TESTSCHEMAVERSIONS' DB Operation: Dispose command Info: Journal table does not exist Info: Executing Database Server script 'Script0001.sql' -Info: Checking whether journal table exists.. +Info: Checking whether journal table exists DB Operation: Execute scalar command: select 1 from user_tables where table_name = 'TESTSCHEMAVERSIONS' DB Operation: Dispose command Info: Creating the "test"."TestSchemaVersions" table diff --git a/src/Tests/ApprovalFiles/DatabaseSupportTests.VerifyVariableSubstitutions.verified.txt b/src/Tests/ApprovalFiles/DatabaseSupportTests.VerifyVariableSubstitutions.approved.txt similarity index 94% rename from src/Tests/ApprovalFiles/DatabaseSupportTests.VerifyVariableSubstitutions.verified.txt rename to src/Tests/ApprovalFiles/DatabaseSupportTests.VerifyVariableSubstitutions.approved.txt index 842879b..2475c9c 100644 --- a/src/Tests/ApprovalFiles/DatabaseSupportTests.VerifyVariableSubstitutions.verified.txt +++ b/src/Tests/ApprovalFiles/DatabaseSupportTests.VerifyVariableSubstitutions.approved.txt @@ -1,11 +1,11 @@ DB Operation: Open connection Info: Beginning database upgrade -Info: Checking whether journal table exists.. +Info: Checking whether journal table exists DB Operation: Execute scalar command: select 1 from user_tables where table_name = 'SCHEMAVERSIONS' DB Operation: Dispose command Info: Journal table does not exist Info: Executing Database Server script 'Script0001.sql' -Info: Checking whether journal table exists.. +Info: Checking whether journal table exists DB Operation: Execute scalar command: select 1 from user_tables where table_name = 'SCHEMAVERSIONS' DB Operation: Dispose command Info: Creating the "schemaversions" table diff --git a/src/Tests/ApprovalFiles/NoPublicApiChanges.Run.Net.verified.cs b/src/Tests/ApprovalFiles/NoPublicApiChanges.Run.Net.verified.cs deleted file mode 100644 index 043616c..0000000 --- a/src/Tests/ApprovalFiles/NoPublicApiChanges.Run.Net.verified.cs +++ /dev/null @@ -1,80 +0,0 @@ -[assembly: System.CLSCompliantAttribute(true)] -[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)] -[assembly: System.Runtime.InteropServices.GuidAttribute("4f62ae2f-797b-488d-a71e-f27873167fa1")] - -namespace DbUp.Oracle -{ - [System.ObsoleteAttribute()] - public class OracleCommandReader : DbUp.Support.SqlCommandReader, System.IDisposable - { - public OracleCommandReader(string sqlText) { } - protected override bool IsCustomStatement { get; } - protected override void ReadCustomStatement() { } - } - public class OracleCommandSplitter - { - [System.ObsoleteAttribute()] - public OracleCommandSplitter() { } - public OracleCommandSplitter(char delimiter) { } - public System.Collections.Generic.IEnumerable SplitScriptIntoCommands(string scriptContents) { } - } - public class OracleConnectionManager : DbUp.Engine.Transactions.DatabaseConnectionManager, DbUp.Engine.Transactions.IConnectionManager - { - [System.ObsoleteAttribute("Use OracleConnectionManager(string, OracleCommandSplitter) and supply an appropriate command splitter instance.")] - public OracleConnectionManager(string connectionString) { } - public OracleConnectionManager(string connectionString, DbUp.Oracle.OracleCommandSplitter commandSplitter) { } - public override System.Collections.Generic.IEnumerable SplitScriptIntoCommands(string scriptContents) { } - } - public class OracleCustomDelimiterCommandReader : DbUp.Support.SqlCommandReader, System.IDisposable - { - public OracleCustomDelimiterCommandReader(string sqlText, char delimiter) { } - protected override bool IsCustomStatement { get; } - protected override void ReadCustomStatement() { } - } - public static class OracleExtensions - { - public static DbUp.Builder.UpgradeEngineBuilder OracleDatabase(DbUp.Engine.Transactions.IConnectionManager connectionManager) { } - [System.ObsoleteAttribute("Use OracleDatabaseWithDefaultDelimiter, OracleDatabaseWithSemicolonDelimiter or the OracleDatabase with the delimiter parameter instead, see https://github.com/DbUp/DbUp/pull/335")] - public static DbUp.Builder.UpgradeEngineBuilder OracleDatabase(this DbUp.Builder.SupportedDatabases supported, string connectionString) { } - public static DbUp.Builder.UpgradeEngineBuilder OracleDatabase(this DbUp.Builder.SupportedDatabases supported, DbUp.Engine.Transactions.IConnectionManager connectionManager) { } - public static DbUp.Builder.UpgradeEngineBuilder OracleDatabase(DbUp.Engine.Transactions.IConnectionManager connectionManager, string schema) { } - public static DbUp.Builder.UpgradeEngineBuilder OracleDatabase(this DbUp.Builder.SupportedDatabases supported, string connectionString, char delimiter) { } - [System.ObsoleteAttribute("Use the parameter that takes a delimiter instead, see https://github.com/DbUp/DbUp/pull/335")] - public static DbUp.Builder.UpgradeEngineBuilder OracleDatabase(this DbUp.Builder.SupportedDatabases supported, string connectionString, string schema) { } - public static DbUp.Builder.UpgradeEngineBuilder OracleDatabase(this DbUp.Builder.SupportedDatabases supported, string connectionString, string schema, char delimiter) { } - [System.ObsoleteAttribute("Use OracleDatabaseWithDefaultDelimiter, OracleDatabaseWithSemicolonDelimiter or the OracleDatabase with the delimiter parameter instead, see https://github.com/DbUp/DbUp/pull/335")] - public static DbUp.Builder.UpgradeEngineBuilder OracleDatabase(this DbUp.Builder.SupportedDatabases supported, string connectionString, string schema, string delimiter) { } - public static DbUp.Builder.UpgradeEngineBuilder OracleDatabaseWithDefaultDelimiter(this DbUp.Builder.SupportedDatabases supported, string connectionString) { } - public static DbUp.Builder.UpgradeEngineBuilder OracleDatabaseWithSemicolonDelimiter(this DbUp.Builder.SupportedDatabases supported, string connectionString) { } - } - public class OracleObjectParser : DbUp.Support.SqlObjectParser, DbUp.Engine.ISqlObjectParser - { - public OracleObjectParser() { } - } - public class OraclePreprocessor : DbUp.Engine.IScriptPreprocessor - { - public OraclePreprocessor() { } - public string Process(string contents) { } - } - public class OracleScriptExecutor : DbUp.Support.ScriptExecutor, DbUp.Engine.IScriptExecutor - { - public OracleScriptExecutor(System.Func connectionManagerFactory, System.Func log, string schema, System.Func variablesEnabled, System.Collections.Generic.IEnumerable scriptPreprocessors, System.Func journalFactory) { } - public override void Execute(DbUp.Engine.SqlScript script) { } - protected override void ExecuteCommandsWithinExceptionHandler(int index, DbUp.Engine.SqlScript script, System.Action executeCommand) { } - protected override string GetVerifySchemaSql(string schema) { } - } - public class OracleTableJournal : DbUp.Support.TableJournal, DbUp.Engine.IJournal - { - public static System.Globalization.CultureInfo English; - public OracleTableJournal(System.Func connectionManager, System.Func logger, string schema, string table) { } - protected string CreateSchemaTableSequenceSql() { } - protected override string CreateSchemaTableSql(string quotedPrimaryKeyName) { } - protected string CreateSchemaTableTriggerSql() { } - protected override string DoesTableExistSql() { } - public override void EnsureTableExistsAndIsLatestVersion(System.Func dbCommandFactory) { } - protected System.Data.IDbCommand GetCreateTableSequence(System.Func dbCommandFactory) { } - protected System.Data.IDbCommand GetCreateTableTrigger(System.Func dbCommandFactory) { } - protected override string GetInsertJournalEntrySql(string scriptName, string applied) { } - protected override string GetJournalEntriesSql() { } - } -} diff --git a/src/Tests/ApprovalFiles/NoPublicApiChanges.Run.DotNet.verified.cs b/src/Tests/ApprovalFiles/NoPublicApiChanges.Run.approved.cs similarity index 100% rename from src/Tests/ApprovalFiles/NoPublicApiChanges.Run.DotNet.verified.cs rename to src/Tests/ApprovalFiles/NoPublicApiChanges.Run.approved.cs diff --git a/src/Tests/Tests.csproj b/src/Tests/Tests.csproj index 353241d..2c2207b 100644 --- a/src/Tests/Tests.csproj +++ b/src/Tests/Tests.csproj @@ -1,7 +1,7 @@ - net462;net8 + net8 Tests DbUp.Oracle.Tests @@ -10,10 +10,10 @@ - - - - + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/dbup-oracle.sln.DotSettings b/src/dbup-oracle.sln.DotSettings index 2c78c0a..d3334fb 100644 --- a/src/dbup-oracle.sln.DotSettings +++ b/src/dbup-oracle.sln.DotSettings @@ -5,5 +5,8 @@ SQ <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> + <Policy><Descriptor Staticness="Instance" AccessRightKinds="Private" Description="Instance fields (private)"><ElementKinds><Kind Name="FIELD" /><Kind Name="READONLY_FIELD" /></ElementKinds></Descriptor><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></Policy> + <Policy><Descriptor Staticness="Static" AccessRightKinds="Private" Description="Static fields (private)"><ElementKinds><Kind Name="FIELD" /></ElementKinds></Descriptor><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></Policy> + True <data><IncludeFilters /><ExcludeFilters /></data> <data /> \ No newline at end of file diff --git a/src/dbup-oracle/OracleScriptExecutor.cs b/src/dbup-oracle/OracleScriptExecutor.cs index 33be0fb..f8442c2 100644 --- a/src/dbup-oracle/OracleScriptExecutor.cs +++ b/src/dbup-oracle/OracleScriptExecutor.cs @@ -47,10 +47,10 @@ protected override void ExecuteCommandsWithinExceptionHandler(int index, SqlScri } catch (OracleException exception) { - Log().WriteInformation("Oracle exception has occurred in script: '{0}'", script.Name); + Log().LogInformation("Oracle exception has occurred in script: '{0}'", script.Name); // OracleException.Number is the actual oracle error code - Log().WriteError("Script block number: {0}; Oracle error code: {1}; Message: {2}", index, exception.Number, exception.Message); - Log().WriteError(exception.ToString()); + Log().LogError("Script block number: {0}; Oracle error code: {1}; Message: {2}", index, exception.Number, exception.Message); + Log().LogError(exception.ToString()); throw; } } diff --git a/src/dbup-oracle/OracleTableJournal.cs b/src/dbup-oracle/OracleTableJournal.cs index 412f912..e2d6625 100644 --- a/src/dbup-oracle/OracleTableJournal.cs +++ b/src/dbup-oracle/OracleTableJournal.cs @@ -95,7 +95,7 @@ public override void EnsureTableExistsAndIsLatestVersion(Func dbComm { if (!journalExists && !DoesTableExist(dbCommandFactory)) { - Log().WriteInformation(string.Format("Creating the {0} table", FqSchemaTableName)); + Log().LogInformation("Creating the {0} table", FqSchemaTableName); // We will never change the schema of the initial table create. using (var command = GetCreateTableSequence(dbCommandFactory)) @@ -115,7 +115,7 @@ public override void EnsureTableExistsAndIsLatestVersion(Func dbComm command.ExecuteNonQuery(); } - Log().WriteInformation(string.Format("The {0} table has been created", FqSchemaTableName)); + Log().LogInformation("The {0} table has been created", FqSchemaTableName); OnTableCreated(dbCommandFactory); } diff --git a/src/dbup-oracle/dbup-oracle.csproj b/src/dbup-oracle/dbup-oracle.csproj index bbaeceb..2ee477c 100644 --- a/src/dbup-oracle/dbup-oracle.csproj +++ b/src/dbup-oracle/dbup-oracle.csproj @@ -6,7 +6,7 @@ DbUp Contributors DbUp Copyright © DbUp Contributors 2015 - netstandard2.0;net462 + netstandard2.0 dbup-oracle DbUp.Oracle dbup-oracle @@ -17,17 +17,10 @@ - - - - + - - - - From fa9d6c83538cc0cd504581e6ccd973f3d099d84b Mon Sep 17 00:00:00 2001 From: Robert Wagner Date: Wed, 24 Jul 2024 14:55:18 +1000 Subject: [PATCH 05/10] Updated to latest Oracle libary, which required bumping to net2.1 --- src/dbup-oracle/dbup-oracle.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dbup-oracle/dbup-oracle.csproj b/src/dbup-oracle/dbup-oracle.csproj index 2ee477c..0ceecbe 100644 --- a/src/dbup-oracle/dbup-oracle.csproj +++ b/src/dbup-oracle/dbup-oracle.csproj @@ -6,7 +6,7 @@ DbUp Contributors DbUp Copyright © DbUp Contributors 2015 - netstandard2.0 + netstandard2.1 dbup-oracle DbUp.Oracle dbup-oracle @@ -18,7 +18,7 @@ - + From 8de42b6e38dd98b30c25550f1071ca2aebb0cfe4 Mon Sep 17 00:00:00 2001 From: Robert Wagner Date: Wed, 24 Jul 2024 15:33:29 +1000 Subject: [PATCH 06/10] Only do a CI build for the main project --- src/Directory.Build.props | 14 -------------- src/Tests/Tests.csproj | 2 +- src/dbup-oracle.sln | 1 + src/dbup-oracle/dbup-oracle.csproj | 6 ++++++ 4 files changed, 8 insertions(+), 15 deletions(-) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index d4e6134..8ed21b4 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -10,18 +10,4 @@ latest true - - - - - true - - - true - - - embedded - - - diff --git a/src/Tests/Tests.csproj b/src/Tests/Tests.csproj index 2c2207b..720af43 100644 --- a/src/Tests/Tests.csproj +++ b/src/Tests/Tests.csproj @@ -4,7 +4,7 @@ net8 Tests DbUp.Oracle.Tests - + enable enable diff --git a/src/dbup-oracle.sln b/src/dbup-oracle.sln index 7e604bc..e75dbed 100644 --- a/src/dbup-oracle.sln +++ b/src/dbup-oracle.sln @@ -23,6 +23,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{77157734-01D ProjectSection(SolutionItems) = preProject .editorconfig = .editorconfig dbup-oracle.sln.DotSettings = dbup-oracle.sln.DotSettings + Directory.Build.props = Directory.Build.props EndProjectSection EndProject Global diff --git a/src/dbup-oracle/dbup-oracle.csproj b/src/dbup-oracle/dbup-oracle.csproj index 0ceecbe..e1a3dd4 100644 --- a/src/dbup-oracle/dbup-oracle.csproj +++ b/src/dbup-oracle/dbup-oracle.csproj @@ -16,6 +16,12 @@ dbup-icon.png + + true + true + embedded + + From 94c6ebf44888d74da5f9cd32d55d7a4ffd888bac Mon Sep 17 00:00:00 2001 From: Robert Wagner Date: Fri, 26 Jul 2024 09:22:27 +1000 Subject: [PATCH 07/10] Bump to the next beta of dbup-core --- src/Tests/Tests.csproj | 2 +- src/dbup-oracle/dbup-oracle.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Tests/Tests.csproj b/src/Tests/Tests.csproj index 720af43..73259a7 100644 --- a/src/Tests/Tests.csproj +++ b/src/Tests/Tests.csproj @@ -10,7 +10,7 @@ - + diff --git a/src/dbup-oracle/dbup-oracle.csproj b/src/dbup-oracle/dbup-oracle.csproj index e1a3dd4..9b1e270 100644 --- a/src/dbup-oracle/dbup-oracle.csproj +++ b/src/dbup-oracle/dbup-oracle.csproj @@ -23,7 +23,7 @@ - + From 6521d776834578f78c3f0ec2c71464eea89e0d9b Mon Sep 17 00:00:00 2001 From: Robert Wagner Date: Wed, 23 Oct 2024 13:22:57 +1000 Subject: [PATCH 08/10] Update to release version of dbup-core 6.0 --- src/Tests/Tests.csproj | 6 +++--- src/dbup-oracle/dbup-oracle.csproj | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Tests/Tests.csproj b/src/Tests/Tests.csproj index 73259a7..dc0f529 100644 --- a/src/Tests/Tests.csproj +++ b/src/Tests/Tests.csproj @@ -10,9 +10,9 @@ - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/dbup-oracle/dbup-oracle.csproj b/src/dbup-oracle/dbup-oracle.csproj index 9b1e270..801431a 100644 --- a/src/dbup-oracle/dbup-oracle.csproj +++ b/src/dbup-oracle/dbup-oracle.csproj @@ -23,8 +23,8 @@ - - + + From dbb0e193588b9e2a01bcfe84b9621041c0f406cc Mon Sep 17 00:00:00 2001 From: Robert Wagner Date: Tue, 17 Dec 2024 10:24:52 +1000 Subject: [PATCH 09/10] Add JournalToOracleTable extension method (#10) * Add JournalToOracleTable extension method * Updated surface area test --------- Co-authored-by: nic upchurch --- .../NoPublicApiChanges.Run.approved.cs | 1 + src/dbup-oracle/OracleExtensions.cs | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/src/Tests/ApprovalFiles/NoPublicApiChanges.Run.approved.cs b/src/Tests/ApprovalFiles/NoPublicApiChanges.Run.approved.cs index 043616c..ff5a8ff 100644 --- a/src/Tests/ApprovalFiles/NoPublicApiChanges.Run.approved.cs +++ b/src/Tests/ApprovalFiles/NoPublicApiChanges.Run.approved.cs @@ -33,6 +33,7 @@ protected override void ReadCustomStatement() { } } public static class OracleExtensions { + public static DbUp.Builder.UpgradeEngineBuilder JournalToOracleTable(this DbUp.Builder.UpgradeEngineBuilder builder, string schema, string table) { } public static DbUp.Builder.UpgradeEngineBuilder OracleDatabase(DbUp.Engine.Transactions.IConnectionManager connectionManager) { } [System.ObsoleteAttribute("Use OracleDatabaseWithDefaultDelimiter, OracleDatabaseWithSemicolonDelimiter or the OracleDatabase with the delimiter parameter instead, see https://github.com/DbUp/DbUp/pull/335")] public static DbUp.Builder.UpgradeEngineBuilder OracleDatabase(this DbUp.Builder.SupportedDatabases supported, string connectionString) { } diff --git a/src/dbup-oracle/OracleExtensions.cs b/src/dbup-oracle/OracleExtensions.cs index fc2def0..75a752f 100644 --- a/src/dbup-oracle/OracleExtensions.cs +++ b/src/dbup-oracle/OracleExtensions.cs @@ -170,6 +170,19 @@ public static UpgradeEngineBuilder OracleDatabase(IConnectionManager connectionM builder.WithPreprocessor(new OraclePreprocessor()); return builder; } + + /// + /// Tracks the list of executed scripts in an Oracle table. + /// + /// The builder. + /// The schema. + /// The table. + /// + public static UpgradeEngineBuilder JournalToOracleTable(this UpgradeEngineBuilder builder, string schema, string table) + { + builder.Configure(c => c.Journal = new OracleTableJournal(() => c.ConnectionManager, () => c.Log, schema, table)); + return builder; + } } #pragma warning restore IDE0060 // Remove unused parameter } From 8371cd10f7e33773adc3dfc54b223673f7db00a5 Mon Sep 17 00:00:00 2001 From: Robert Wagner Date: Tue, 17 Dec 2024 10:42:01 +1000 Subject: [PATCH 10/10] Update all the packages --- src/Tests/Tests.csproj | 6 +++--- src/dbup-oracle/dbup-oracle.csproj | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Tests/Tests.csproj b/src/Tests/Tests.csproj index dc0f529..770784d 100644 --- a/src/Tests/Tests.csproj +++ b/src/Tests/Tests.csproj @@ -10,10 +10,10 @@ - - + + - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/dbup-oracle/dbup-oracle.csproj b/src/dbup-oracle/dbup-oracle.csproj index 801431a..b2afd84 100644 --- a/src/dbup-oracle/dbup-oracle.csproj +++ b/src/dbup-oracle/dbup-oracle.csproj @@ -23,8 +23,8 @@ - - + +