Skip to content
Snippets Groups Projects
Commit 8c82b5cb authored by Petar Hristov's avatar Petar Hristov :speech_balloon:
Browse files

Update: Got rid of net461

parent fb978500
No related branches found
No related tags found
1 merge request!186New: Guest Role
Showing
with 9 additions and 85 deletions
......@@ -28,10 +28,6 @@ migrate:
- dotnet run --project .\src\Database.Actions -- --action-create --name $DB_NAME --source $DB_DATA_SOURCE --user $DB_USER_ID --pw $DB_PASSWORD
# Scaffold created database
- dotnet ef dbcontext scaffold "Data Source=$DB_DATA_SOURCE;Integrated Security=False;User ID=$DB_USER_ID;Password=$DB_PASSWORD;Database=$DB_NAME" Microsoft.EntityFrameworkCore.SqlServer -o DataModel -c "Model" -f --no-onconfiguring --project "src\Scaffolding"
# Remove the hardcoded Connection String inside \DataModel\Model.cs
- Set-Content -Path ".\src\Scaffolding\DataModel\Model.txt" -Value (Get-Content -Path ".\src\Scaffolding\DataModel\Model.cs" | where { $_ | Select-String -Pattern '#warning' -NotMatch } | where { $_ | Select-String -Pattern 'Data Source=' -NotMatch } ) -Force
- Set-Content -Path ".\src\Scaffolding\DataModel\Model.cs" -Value (Get-Content -Path ".\src\Scaffolding\DataModel\Model.txt") -Force
- Remove-Item ".\src\Scaffolding\DataModel\Model.txt"
artifacts:
paths:
- src\Scaffolding\DataModel
......
......
......@@ -3,7 +3,7 @@
<OutputType>Library</OutputType>
<RootNamespace>Coscine.Database.Tests</RootNamespace>
<AssemblyName>Coscine.Database.Tests</AssemblyName>
<TargetFrameworks>net6.0;net461</TargetFrameworks>
<TargetFramework>net6.0</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<Version>2.17.0</Version>
</PropertyGroup>
......@@ -14,9 +14,9 @@
<PackageReference Include="Coscine.Configuration" Version="2.*-*" />
<PackageReference Include="Coscine.Database.Helpers" Version="2.*-*" />
<PackageReference Include="Coscine.Migrations" Version="2.*-*" />
<PackageReference Include="linq2db" Version="3.2.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.1" />
<PackageReference Include="NUnit" Version="3.13.1" />
<PackageReference Include="NUnit3TestAdapter" Version="3.17.0" />
<PackageReference Include="linq2db" Version="4.3.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.3.1" />
</ItemGroup>
</Project>
......@@ -3,7 +3,7 @@
<OutputType>Library</OutputType>
<RootNamespace>Coscine.Database</RootNamespace>
<AssemblyName>Coscine.Database</AssemblyName>
<TargetFrameworks>net6.0;net461</TargetFrameworks>
<TargetFramework>net6.0</TargetFramework>
<Version>2.17.0</Version>
</PropertyGroup>
<PropertyGroup>
......@@ -30,14 +30,10 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Coscine.Configuration" Version="2.*-*" />
<PackageReference Include="LinqKit" Version="1.1.23" />
<PackageReference Include="LinqKit" Version="1.2.3" />
<PackageReference Include="Inflector.NetStandard" Version="1.2.2" />
<!-- Note: use newest Microsoft.EntityFrameworkCore Version for net6.0 -->
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.4" Condition="'$(TargetFramework)' == 'net6.0'" PrivateAssets="all" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.4" Condition="'$(TargetFramework)' == 'net6.0'" />
<!-- Note: use Microsoft.EntityFrameworkCore Version 3.x.x for compatibility with net461 -->
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.1.12" Condition="'$(TargetFramework)' == 'net461'" PrivateAssets="all" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.12" Condition="'$(TargetFramework)' == 'net461'" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.11" PrivateAssets="all" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.11" />
</ItemGroup>
<PropertyGroup>
<LangVersion>Preview</LangVersion>
......
......
using System;
using System.Collections.Generic;
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
// If you have enabled NRTs for your project, then un-comment the following line:
// #nullable disable
namespace Coscine.Database.DataModel
{
public partial class ActivatedFeature
......
......
using System;
using System.Collections.Generic;
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
// If you have enabled NRTs for your project, then un-comment the following line:
// #nullable disable
namespace Coscine.Database.DataModel
{
public partial class ApiToken
......
......
using System;
using System.Collections.Generic;
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
// If you have enabled NRTs for your project, then un-comment the following line:
// #nullable disable
namespace Coscine.Database.DataModel
{
public partial class ContactChange
......
......
using System;
using System.Collections.Generic;
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
// If you have enabled NRTs for your project, then un-comment the following line:
// #nullable disable
namespace Coscine.Database.DataModel
{
public partial class Discipline
......
......
using System;
using System.Collections.Generic;
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
// If you have enabled NRTs for your project, then un-comment the following line:
// #nullable disable
namespace Coscine.Database.DataModel
{
public partial class ExternalAuthenticator
......
......
using System;
using System.Collections.Generic;
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
// If you have enabled NRTs for your project, then un-comment the following line:
// #nullable disable
namespace Coscine.Database.DataModel
{
public partial class ExternalId
......
......
using System;
using System.Collections.Generic;
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
// If you have enabled NRTs for your project, then un-comment the following line:
// #nullable disable
namespace Coscine.Database.DataModel
{
public partial class Feature
......
......
using System;
using System.Collections.Generic;
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
// If you have enabled NRTs for your project, then un-comment the following line:
// #nullable disable
namespace Coscine.Database.DataModel
{
public partial class GitlabResourceType
......
......
using System;
using System.Collections.Generic;
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
// If you have enabled NRTs for your project, then un-comment the following line:
// #nullable disable
namespace Coscine.Database.DataModel
{
public partial class Group
......
......
using System;
using System.Collections.Generic;
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
// If you have enabled NRTs for your project, then un-comment the following line:
// #nullable disable
namespace Coscine.Database.DataModel
{
public partial class GroupMembership
......
......
using System;
using System.Collections.Generic;
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
// If you have enabled NRTs for your project, then un-comment the following line:
// #nullable disable
namespace Coscine.Database.DataModel
{
public partial class Invitation
......
......
using System;
using System.Collections.Generic;
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
// If you have enabled NRTs for your project, then un-comment the following line:
// #nullable disable
namespace Coscine.Database.DataModel
{
public partial class Kpi
......
......
using System;
using System.Collections.Generic;
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
// If you have enabled NRTs for your project, then un-comment the following line:
// #nullable disable
namespace Coscine.Database.DataModel
{
public partial class Language
......
......
using System;
using System.Collections.Generic;
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
// If you have enabled NRTs for your project, then un-comment the following line:
// #nullable disable
namespace Coscine.Database.DataModel
{
public partial class License
......
......
using System;
using System.Collections.Generic;
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
// If you have enabled NRTs for your project, then un-comment the following line:
// #nullable disable
namespace Coscine.Database.DataModel
{
public partial class LinkedResourceType
......
......
using System;
using System.Collections.Generic;
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
// If you have enabled NRTs for your project, then un-comment the following line:
// #nullable disable
namespace Coscine.Database.DataModel
{
public partial class Log
......
......
using System;
using System.Collections.Generic;
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
// If you have enabled NRTs for your project, then un-comment the following line:
// #nullable disable
namespace Coscine.Database.DataModel
{
public partial class MetadataExtraction
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment