Downgrade WebController target framework to 2.1

dependabot/npm_and_yarn/Src/WebController/UI/websocket-extensions-0.1.4
Grzegorz Rychlik 2020-01-30 12:36:03 +01:00
parent 9c8066b162
commit 2262bf8f71
5 changed files with 31 additions and 17 deletions

View File

@ -9,14 +9,14 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace MWR.C3.WebController.Migrations
{
[DbContext(typeof(C3WebAPIContext))]
[Migration("20190821154317_Initial")]
[Migration("20200130113057_Initial")]
partial class Initial
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "2.2.6-servicing-10079");
.HasAnnotation("ProductVersion", "2.1.14-servicing-32113");
modelBuilder.Entity("MWR.C3.WebController.Models.Agent", b =>
{
@ -179,6 +179,9 @@ namespace MWR.C3.WebController.Migrations
{
b.HasBaseType("MWR.C3.WebController.Models.Agent");
b.ToTable("Gateway");
b.HasDiscriminator().HasValue("Gateway");
});
@ -190,6 +193,8 @@ namespace MWR.C3.WebController.Migrations
b.HasIndex("GatewayAgentId");
b.ToTable("Relay");
b.HasDiscriminator().HasValue("Relay");
});
@ -201,6 +206,8 @@ namespace MWR.C3.WebController.Migrations
b.Property<string>("RelayCommands");
b.ToTable("GatewayBuild");
b.HasDiscriminator().HasValue("GatewayBuild");
});
@ -210,6 +217,8 @@ namespace MWR.C3.WebController.Migrations
b.Property<string>("StartupCommands");
b.ToTable("RelayBuild");
b.HasDiscriminator().HasValue("RelayBuild");
});
@ -286,8 +295,6 @@ namespace MWR.C3.WebController.Migrations
b1.Property<string>("UserName");
b1.HasKey("RelayAgentId");
b1.ToTable("Agent");
b1.HasOne("MWR.C3.WebController.Models.Relay")

View File

@ -11,12 +11,12 @@ namespace MWR.C3.WebController.Migrations
name: "Builds",
columns: table => new
{
BuildId = table.Column<ulong>(nullable: false)
.Annotation("Sqlite:Autoincrement", true),
Type = table.Column<int>(nullable: false),
Arch = table.Column<int>(nullable: false),
PublicKey = table.Column<byte[]>(nullable: true),
BroadcastKey = table.Column<byte[]>(nullable: true),
BuildId = table.Column<ulong>(nullable: false)
.Annotation("Sqlite:Autoincrement", true),
Commands = table.Column<string>(nullable: true),
Peripherals = table.Column<string>(nullable: true),
Channels = table.Column<string>(nullable: true),
@ -35,12 +35,12 @@ namespace MWR.C3.WebController.Migrations
name: "Commands",
columns: table => new
{
Id = table.Column<ulong>(nullable: false)
.Annotation("Sqlite:Autoincrement", true),
GatewayAgentId = table.Column<ulong>(nullable: false),
RelayAgentId = table.Column<ulong>(nullable: true),
InterfaceId = table.Column<ulong>(nullable: true),
DeviceType = table.Column<string>(nullable: true),
Id = table.Column<ulong>(nullable: false)
.Annotation("Sqlite:Autoincrement", true),
Name = table.Column<string>(nullable: false),
Data = table.Column<string>(nullable: true)
},
@ -83,7 +83,6 @@ namespace MWR.C3.WebController.Migrations
name: "Agent",
columns: table => new
{
RelayAgentId = table.Column<ulong>(nullable: false),
ComputerName = table.Column<string>(nullable: true),
UserName = table.Column<string>(nullable: true),
Domain = table.Column<string>(nullable: true),
@ -94,7 +93,8 @@ namespace MWR.C3.WebController.Migrations
OsServicePackMinor = table.Column<ushort>(nullable: false),
OsProductType = table.Column<byte>(nullable: false),
ProcessId = table.Column<uint>(nullable: false),
IsElevated = table.Column<bool>(nullable: false)
IsElevated = table.Column<bool>(nullable: false),
RelayAgentId = table.Column<ulong>(nullable: false)
},
constraints: table =>
{

View File

@ -14,7 +14,7 @@ namespace MWR.C3.WebController.Migrations
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "2.2.6-servicing-10079");
.HasAnnotation("ProductVersion", "2.1.14-servicing-32113");
modelBuilder.Entity("MWR.C3.WebController.Models.Agent", b =>
{
@ -177,6 +177,9 @@ namespace MWR.C3.WebController.Migrations
{
b.HasBaseType("MWR.C3.WebController.Models.Agent");
b.ToTable("Gateway");
b.HasDiscriminator().HasValue("Gateway");
});
@ -188,6 +191,8 @@ namespace MWR.C3.WebController.Migrations
b.HasIndex("GatewayAgentId");
b.ToTable("Relay");
b.HasDiscriminator().HasValue("Relay");
});
@ -199,6 +204,8 @@ namespace MWR.C3.WebController.Migrations
b.Property<string>("RelayCommands");
b.ToTable("GatewayBuild");
b.HasDiscriminator().HasValue("GatewayBuild");
});
@ -208,6 +215,8 @@ namespace MWR.C3.WebController.Migrations
b.Property<string>("StartupCommands");
b.ToTable("RelayBuild");
b.HasDiscriminator().HasValue("RelayBuild");
});
@ -284,8 +293,6 @@ namespace MWR.C3.WebController.Migrations
b1.Property<string>("UserName");
b1.HasKey("RelayAgentId");
b1.ToTable("Agent");
b1.HasOne("MWR.C3.WebController.Models.Relay")

View File

@ -26,7 +26,7 @@ namespace MWR.C3.WebController
public void ConfigureServices(IServiceCollection services)
{
services.AddMvc()
.SetCompatibilityVersion(CompatibilityVersion.Version_2_2)
.SetCompatibilityVersion(CompatibilityVersion.Version_2_1)
.AddJsonOptions(options => {
options.SerializerSettings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore;
options.SerializerSettings.NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore;

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>netcoreapp2.1</TargetFramework>
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
<RootNamespace>MWR.C3.WebController</RootNamespace>
<AssemblyName>C3WebController</AssemblyName>
@ -46,8 +46,8 @@
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.2.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.2.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.1.14" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.1.14" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
<PackageReference Include="Nito.AsyncEx" Version="5.0.0" />
<PackageReference Include="Serilog" Version="2.8.0" />