Skip to content

Commit

Permalink
Updated to dbup-core 6.0 beta and only targeted netstandard2
Browse files Browse the repository at this point in the history
  • Loading branch information
droyad committed Jul 24, 2024
1 parent 0da2b57 commit 35b76e8
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 63 deletions.
4 changes: 2 additions & 2 deletions src/Sample/Sample.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<OutputType>Exe</OutputType>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\dbup-firebird\dbup-firebird.csproj"/>
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0"/>
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0"/>
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -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 RDB$RELATIONS where RDB$SYSTEM_FLAG = 0 and RDB$RELATION_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 RDB$RELATIONS where RDB$SYSTEM_FLAG = 0 and RDB$RELATION_NAME = 'schemaversions'
DB Operation: Dispose command
Info: Creating the "schemaversions" table
Expand Down
Original file line number Diff line number Diff line change
@@ -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 RDB$RELATIONS where RDB$SYSTEM_FLAG = 0 and RDB$RELATION_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 RDB$RELATIONS where RDB$SYSTEM_FLAG = 0 and RDB$RELATION_NAME = 'TestSchemaVersions'
DB Operation: Dispose command
Info: Creating the "TestSchemaVersions" table
Expand Down
Original file line number Diff line number Diff line change
@@ -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 RDB$RELATIONS where RDB$SYSTEM_FLAG = 0 and RDB$RELATION_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 RDB$RELATIONS where RDB$SYSTEM_FLAG = 0 and RDB$RELATION_NAME = 'schemaversions'
DB Operation: Dispose command
Info: Creating the "schemaversions" table
Expand Down
43 changes: 0 additions & 43 deletions src/Tests/ApprovalFiles/NoPublicApiChanges.Run.Net.verified.cs

This file was deleted.

10 changes: 5 additions & 5 deletions src/Tests/Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net462;net8</TargetFrameworks>
<TargetFramework>net8</TargetFramework>
<AssemblyName>Tests</AssemblyName>
<RootNamespace>DbUp.Firebird.Tests</RootNamespace>
<!-- <ImplicitUsings>enable</ImplicitUsings> Can't use implict usings with net46 -->
Expand All @@ -10,10 +10,10 @@

<ItemGroup>
<ProjectReference Include="..\dbup-firebird\dbup-firebird.csproj"/>
<PackageReference Include="DbUp.Tests.Common" Version="5.0.37"/>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0"/>
<PackageReference Include="xunit" Version="2.6.6"/>
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.6">
<PackageReference Include="DbUp.Tests.Common" Version="6.0.0-beta.108"/>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0"/>
<PackageReference Include="xunit" Version="2.9.0"/>
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
3 changes: 3 additions & 0 deletions src/dbup-firebird.sln.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=SQ/@EntryIndexedValue">SQ</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateInstanceFields/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateStaticFields/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /&gt;</s:String>
<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>
<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>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EPredefinedNamingRulesToUserRulesUpgrade/@EntryIndexedValue">True</s:Boolean>
<s:String x:Key="/Default/FilterSettingsManager/CoverageFilterXml/@EntryValue">&lt;data&gt;&lt;IncludeFilters /&gt;&lt;ExcludeFilters /&gt;&lt;/data&gt;</s:String>
<s:String x:Key="/Default/FilterSettingsManager/AttributeFilterXml/@EntryValue">&lt;data /&gt;</s:String></wpf:ResourceDictionary>
6 changes: 3 additions & 3 deletions src/dbup-firebird/FirebirdScriptExecutor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ protected override void ExecuteCommandsWithinExceptionHandler(int index, SqlScri
}
catch (FbException fbException)
{
Log().WriteInformation("Firebird exception has occured in script: '{0}'", script.Name);
Log().WriteError("Script block number: {0}; Firebird error code: {1}; SQLSTATE {2}; Message: {3}", index, fbException.ErrorCode, fbException.SQLSTATE, fbException.Message);
Log().WriteError(fbException.ToString());
Log().LogInformation("Firebird exception has occured in script: '{0}'", script.Name);
Log().LogError("Script block number: {0}; Firebird error code: {1}; SQLSTATE {2}; Message: {3}", index, fbException.ErrorCode, fbException.SQLSTATE, fbException.Message);
Log().LogError(fbException.ToString());
throw;
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/dbup-firebird/FirebirdTableJournal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ protected override void OnTableCreated(Func<IDbCommand> dbCommandFactory)
{
var unquotedTableName = UnquoteSqlObjectName(FqSchemaTableName);
ExecuteCommand(dbCommandFactory, CreateGeneratorSql(unquotedTableName));
Log().WriteInformation($"The {GeneratorName(unquotedTableName)} generator has been created");
Log().LogInformation($"The {GeneratorName(unquotedTableName)} generator has been created");
ExecuteCommand(dbCommandFactory, CreateTriggerSql(unquotedTableName));
Log().WriteInformation($"The {TriggerName(unquotedTableName)} trigger has been created");
Log().LogInformation($"The {TriggerName(unquotedTableName)} trigger has been created");
}

protected override string DoesTableExistSql()
Expand Down
4 changes: 2 additions & 2 deletions src/dbup-firebird/dbup-firebird.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<Company>DbUp Contributors</Company>
<Product>DbUp</Product>
<Copyright>Copyright © DbUp Contributors 2015</Copyright>
<TargetFrameworks>net462;netstandard2.0</TargetFrameworks>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>dbup-firebird</AssemblyName>
<RootNamespace>DbUp.Firebird</RootNamespace>
<PackageId>dbup-firebird</PackageId>
Expand All @@ -18,7 +18,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="dbup-core" Version="5.0.37"/>
<PackageReference Include="dbup-core" Version="6.0.0-beta.108"/>
<PackageReference Include="FirebirdSql.Data.FirebirdClient" Version="9.1.1"/>
</ItemGroup>

Expand Down

0 comments on commit 35b76e8

Please sign in to comment.