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 @@ - - - - + - - - -