Skip to content

Commit e00b74d

Browse files
authored
Merge pull request #8 from DbUp/core6
Update to `dbup-core` `6.0` and Oracle library reference
2 parents d0cbc25 + 94c6ebf commit e00b74d

12 files changed

+30
-121
lines changed

src/Directory.Build.props

-14
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,4 @@
1010
<LangVersion>latest</LangVersion>
1111
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
1212
</PropertyGroup>
13-
14-
<PropertyGroup Condition="'$(TF_BUILD)' == 'true' Or '$(CI)' == 'true'">
15-
16-
<!-- Perform a deterministic build, so our binaries aren't impacted by build server environmental factors (e.g. file paths). -->
17-
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
18-
19-
<!-- Embed source files that are not tracked by the source control manager in the PDB -->
20-
<EmbedUntrackedSources>true</EmbedUntrackedSources>
21-
22-
<!-- Recommended: Embed symbols containing Source Link in the main file (exe/dll) -->
23-
<DebugType>embedded</DebugType>
24-
25-
</PropertyGroup>
26-
2713
</Project>

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

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
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>
7-
<!-- <ImplicitUsings>enable</ImplicitUsings> Can't use implict usings with net46 -->
7+
<ImplicitUsings>enable</ImplicitUsings>
88
<Nullable>enable</Nullable>
99
</PropertyGroup>
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.146"/>
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

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{77157734-01D
2323
ProjectSection(SolutionItems) = preProject
2424
.editorconfig = .editorconfig
2525
dbup-oracle.sln.DotSettings = dbup-oracle.sln.DotSettings
26+
Directory.Build.props = Directory.Build.props
2627
EndProjectSection
2728
EndProject
2829
Global

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

+9-10
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.1</TargetFramework>
1010
<AssemblyName>dbup-oracle</AssemblyName>
1111
<RootNamespace>DbUp.Oracle</RootNamespace>
1212
<PackageId>dbup-oracle</PackageId>
@@ -16,16 +16,15 @@
1616
<PackageIcon>dbup-icon.png</PackageIcon>
1717
</PropertyGroup>
1818

19-
<ItemGroup>
20-
<PackageReference Include="dbup-core" Version="5.0.37"/>
21-
</ItemGroup>
22-
23-
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
24-
<PackageReference Include="Oracle.ManagedDataAccess.Core" Version="2.19.200" />
25-
</ItemGroup>
19+
<PropertyGroup Condition="'$(CI)' == 'true'">
20+
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild> <!-- Perform a deterministic build, so our binaries aren't impacted by build server environmental factors (e.g. file paths). -->
21+
<EmbedUntrackedSources>true</EmbedUntrackedSources> <!-- Embed source files that are not tracked by the source control manager in the PDB -->
22+
<DebugType>embedded</DebugType> <!-- Recommended: Embed symbols containing Source Link in the main file (exe/dll) -->
23+
</PropertyGroup>
2624

27-
<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
28-
<PackageReference Include="Oracle.ManagedDataAccess" Version="12.2.1100" />
25+
<ItemGroup>
26+
<PackageReference Include="dbup-core" Version="6.0.0-beta.146"/>
27+
<PackageReference Include="Oracle.ManagedDataAccess.Core" Version="23.5.0" />
2928
</ItemGroup>
3029

3130
<ItemGroup>

0 commit comments

Comments
 (0)