Skip to content

Commit 16a456c

Browse files
committed
Updated to DbUp 6 and only targeted netstandard2
1 parent d0cbc25 commit 16a456c

10 files changed

+21
-105
lines changed

src/Tests/ApprovalFiles/DatabaseSupportTests.VerifyBasicSupport.verified.txt src/Tests/ApprovalFiles/DatabaseSupportTests.VerifyBasicSupport.approved.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
DB Operation: Open connection
22
Info: Beginning database upgrade
3-
Info: Checking whether journal table exists..
3+
Info: Checking whether journal table exists
44
DB Operation: Execute scalar command: select 1 from user_tables where table_name = 'SCHEMAVERSIONS'
55
DB Operation: Dispose command
66
Info: Journal table does not exist
77
Info: Executing Database Server script 'Script0001.sql'
8-
Info: Checking whether journal table exists..
8+
Info: Checking whether journal table exists
99
DB Operation: Execute scalar command: select 1 from user_tables where table_name = 'SCHEMAVERSIONS'
1010
DB Operation: Dispose command
1111
Info: Creating the "schemaversions" table

src/Tests/ApprovalFiles/DatabaseSupportTests.VerifyJournalCreationIfNameChanged.verified.txt src/Tests/ApprovalFiles/DatabaseSupportTests.VerifyJournalCreationIfNameChanged.approved.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
DB Operation: Open connection
22
Info: Beginning database upgrade
3-
Info: Checking whether journal table exists..
3+
Info: Checking whether journal table exists
44
DB Operation: Execute scalar command: select 1 from user_tables where table_name = 'TESTSCHEMAVERSIONS'
55
DB Operation: Dispose command
66
Info: Journal table does not exist
77
Info: Executing Database Server script 'Script0001.sql'
8-
Info: Checking whether journal table exists..
8+
Info: Checking whether journal table exists
99
DB Operation: Execute scalar command: select 1 from user_tables where table_name = 'TESTSCHEMAVERSIONS'
1010
DB Operation: Dispose command
1111
Info: Creating the "test"."TestSchemaVersions" table

src/Tests/ApprovalFiles/DatabaseSupportTests.VerifyVariableSubstitutions.verified.txt src/Tests/ApprovalFiles/DatabaseSupportTests.VerifyVariableSubstitutions.approved.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
DB Operation: Open connection
22
Info: Beginning database upgrade
3-
Info: Checking whether journal table exists..
3+
Info: Checking whether journal table exists
44
DB Operation: Execute scalar command: select 1 from user_tables where table_name = 'SCHEMAVERSIONS'
55
DB Operation: Dispose command
66
Info: Journal table does not exist
77
Info: Executing Database Server script 'Script0001.sql'
8-
Info: Checking whether journal table exists..
8+
Info: Checking whether journal table exists
99
DB Operation: Execute scalar command: select 1 from user_tables where table_name = 'SCHEMAVERSIONS'
1010
DB Operation: Dispose command
1111
Info: Creating the "schemaversions" table

src/Tests/ApprovalFiles/NoPublicApiChanges.Run.Net.verified.cs

-80
This file was deleted.

src/Tests/Tests.csproj

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net462;net8</TargetFrameworks>
4+
<TargetFramework>net8</TargetFramework>
55
<AssemblyName>Tests</AssemblyName>
66
<RootNamespace>DbUp.Oracle.Tests</RootNamespace>
77
<!-- <ImplicitUsings>enable</ImplicitUsings> Can't use implict usings with net46 -->
@@ -10,10 +10,10 @@
1010

1111
<ItemGroup>
1212
<ProjectReference Include="..\dbup-oracle\dbup-oracle.csproj"/>
13-
<PackageReference Include="DbUp.Tests.Common" Version="5.0.37"/>
14-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0"/>
15-
<PackageReference Include="xunit" Version="2.6.6"/>
16-
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.6">
13+
<PackageReference Include="DbUp.Tests.Common" Version="6.0.0-beta.108"/>
14+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0"/>
15+
<PackageReference Include="xunit" Version="2.9.0"/>
16+
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
1717
<PrivateAssets>all</PrivateAssets>
1818
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1919
</PackageReference>

src/dbup-oracle.sln.DotSettings

+3
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,8 @@
55
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=SQ/@EntryIndexedValue">SQ</s:String>
66
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateInstanceFields/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /&gt;</s:String>
77
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateStaticFields/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /&gt;</s:String>
8+
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=4a98fdf6_002D7d98_002D4f5a_002Dafeb_002Dea44ad98c70c/@EntryIndexedValue">&lt;Policy&gt;&lt;Descriptor Staticness="Instance" AccessRightKinds="Private" Description="Instance fields (private)"&gt;&lt;ElementKinds&gt;&lt;Kind Name="FIELD" /&gt;&lt;Kind Name="READONLY_FIELD" /&gt;&lt;/ElementKinds&gt;&lt;/Descriptor&gt;&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /&gt;&lt;/Policy&gt;</s:String>
9+
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=f9fce829_002De6f4_002D4cb2_002D80f1_002D5497c44f51df/@EntryIndexedValue">&lt;Policy&gt;&lt;Descriptor Staticness="Static" AccessRightKinds="Private" Description="Static fields (private)"&gt;&lt;ElementKinds&gt;&lt;Kind Name="FIELD" /&gt;&lt;/ElementKinds&gt;&lt;/Descriptor&gt;&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /&gt;&lt;/Policy&gt;</s:String>
10+
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EPredefinedNamingRulesToUserRulesUpgrade/@EntryIndexedValue">True</s:Boolean>
811
<s:String x:Key="/Default/FilterSettingsManager/CoverageFilterXml/@EntryValue">&lt;data&gt;&lt;IncludeFilters /&gt;&lt;ExcludeFilters /&gt;&lt;/data&gt;</s:String>
912
<s:String x:Key="/Default/FilterSettingsManager/AttributeFilterXml/@EntryValue">&lt;data /&gt;</s:String></wpf:ResourceDictionary>

src/dbup-oracle/OracleScriptExecutor.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ protected override void ExecuteCommandsWithinExceptionHandler(int index, SqlScri
4747
}
4848
catch (OracleException exception)
4949
{
50-
Log().WriteInformation("Oracle exception has occurred in script: '{0}'", script.Name);
50+
Log().LogInformation("Oracle exception has occurred in script: '{0}'", script.Name);
5151
// OracleException.Number is the actual oracle error code
52-
Log().WriteError("Script block number: {0}; Oracle error code: {1}; Message: {2}", index, exception.Number, exception.Message);
53-
Log().WriteError(exception.ToString());
52+
Log().LogError("Script block number: {0}; Oracle error code: {1}; Message: {2}", index, exception.Number, exception.Message);
53+
Log().LogError(exception.ToString());
5454
throw;
5555
}
5656
}

src/dbup-oracle/OracleTableJournal.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public override void EnsureTableExistsAndIsLatestVersion(Func<IDbCommand> dbComm
9595
{
9696
if (!journalExists && !DoesTableExist(dbCommandFactory))
9797
{
98-
Log().WriteInformation(string.Format("Creating the {0} table", FqSchemaTableName));
98+
Log().LogInformation("Creating the {0} table", FqSchemaTableName);
9999

100100
// We will never change the schema of the initial table create.
101101
using (var command = GetCreateTableSequence(dbCommandFactory))
@@ -115,7 +115,7 @@ public override void EnsureTableExistsAndIsLatestVersion(Func<IDbCommand> dbComm
115115
command.ExecuteNonQuery();
116116
}
117117

118-
Log().WriteInformation(string.Format("The {0} table has been created", FqSchemaTableName));
118+
Log().LogInformation("The {0} table has been created", FqSchemaTableName);
119119

120120
OnTableCreated(dbCommandFactory);
121121
}

src/dbup-oracle/dbup-oracle.csproj

+2-9
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<Company>DbUp Contributors</Company>
77
<Product>DbUp</Product>
88
<Copyright>Copyright © DbUp Contributors 2015</Copyright>
9-
<TargetFrameworks>netstandard2.0;net462</TargetFrameworks>
9+
<TargetFramework>netstandard2.0</TargetFramework>
1010
<AssemblyName>dbup-oracle</AssemblyName>
1111
<RootNamespace>DbUp.Oracle</RootNamespace>
1212
<PackageId>dbup-oracle</PackageId>
@@ -17,17 +17,10 @@
1717
</PropertyGroup>
1818

1919
<ItemGroup>
20-
<PackageReference Include="dbup-core" Version="5.0.37"/>
21-
</ItemGroup>
22-
23-
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
20+
<PackageReference Include="dbup-core" Version="6.0.0-beta.108"/>
2421
<PackageReference Include="Oracle.ManagedDataAccess.Core" Version="2.19.200" />
2522
</ItemGroup>
2623

27-
<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
28-
<PackageReference Include="Oracle.ManagedDataAccess" Version="12.2.1100" />
29-
</ItemGroup>
30-
3124
<ItemGroup>
3225
<None Visible="false" Include="../dbup-icon.png" Pack="True" PackagePath=""/>
3326
</ItemGroup>

0 commit comments

Comments
 (0)