Update Aaru linked dependencies to v6.0.0-alpha.10.

This commit is contained in:
2025-04-27 12:01:17 +01:00
parent 94d330fe88
commit f7a1a134ba
11 changed files with 4627 additions and 83 deletions

View File

@@ -7,7 +7,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Aaru.CommonTypes" Version="6.0.0-alpha8"/> <PackageReference Include="Aaru.CommonTypes" Version="6.0.0-alpha10"/>
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="9.0.0"/> <PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="9.0.0"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.0"/> <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.0"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="9.0.0"/> <PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="9.0.0"/>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,9 @@
// <auto-generated /> // <auto-generated />
using System; using System;
using Aaru.Server.Database;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable #nullable disable
@@ -15,15 +17,22 @@ namespace Aaru.Server.Database.Migrations
{ {
#pragma warning disable 612, 618 #pragma warning disable 612, 618
modelBuilder modelBuilder
.HasAnnotation("ProductVersion", "6.0.0") .HasAnnotation("ProductVersion", "9.0.0")
.HasAnnotation("Proxies:ChangeTracking", false)
.HasAnnotation("Proxies:CheckEquality", false)
.HasAnnotation("Proxies:LazyLoading", true)
.HasAnnotation("Relational:MaxIdentifierLength", 64); .HasAnnotation("Relational:MaxIdentifierLength", 64);
MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
modelBuilder.Entity("Aaru.CommonTypes.Metadata.Ata", b => modelBuilder.Entity("Aaru.CommonTypes.Metadata.Ata", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<byte[]>("Identify") b.Property<byte[]>("Identify")
.HasColumnType("longblob"); .HasColumnType("longblob");
@@ -43,6 +52,8 @@ namespace Aaru.Server.Database.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<uint?>("BlockLength") b.Property<uint?>("BlockLength")
.HasColumnType("int unsigned"); .HasColumnType("int unsigned");
@@ -68,6 +79,8 @@ namespace Aaru.Server.Database.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<ushort>("Cylinders") b.Property<ushort>("Cylinders")
.HasColumnType("smallint unsigned"); .HasColumnType("smallint unsigned");
@@ -88,6 +101,8 @@ namespace Aaru.Server.Database.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<int>("Code") b.Property<int>("Code")
.HasColumnType("int"); .HasColumnType("int");
@@ -107,6 +122,8 @@ namespace Aaru.Server.Database.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<string>("Manufacturer") b.Property<string>("Manufacturer")
.HasColumnType("longtext"); .HasColumnType("longtext");
@@ -133,6 +150,8 @@ namespace Aaru.Server.Database.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<byte[]>("Lba0Data") b.Property<byte[]>("Lba0Data")
.HasColumnType("longblob"); .HasColumnType("longblob");
@@ -738,6 +757,8 @@ namespace Aaru.Server.Database.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<int?>("FeaturesId") b.Property<int?>("FeaturesId")
.HasColumnType("int"); .HasColumnType("int");
@@ -757,6 +778,8 @@ namespace Aaru.Server.Database.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<byte?>("AACSVersion") b.Property<byte?>("AACSVersion")
.HasColumnType("tinyint unsigned"); .HasColumnType("tinyint unsigned");
@@ -1140,6 +1163,8 @@ namespace Aaru.Server.Database.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<byte[]>("CID") b.Property<byte[]>("CID")
.HasColumnType("longblob"); .HasColumnType("longblob");
@@ -1166,6 +1191,8 @@ namespace Aaru.Server.Database.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<byte[]>("CIS") b.Property<byte[]>("CIS")
.HasColumnType("longblob"); .HasColumnType("longblob");
@@ -1195,6 +1222,8 @@ namespace Aaru.Server.Database.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<byte[]>("InquiryData") b.Property<byte[]>("InquiryData")
.HasColumnType("longblob"); .HasColumnType("longblob");
@@ -1256,6 +1285,8 @@ namespace Aaru.Server.Database.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<bool>("BlankCheckEnabled") b.Property<bool>("BlankCheckEnabled")
.HasColumnType("tinyint(1)"); .HasColumnType("tinyint(1)");
@@ -1285,6 +1316,8 @@ namespace Aaru.Server.Database.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<int?>("ScsiId") b.Property<int?>("ScsiId")
.HasColumnType("int"); .HasColumnType("int");
@@ -1315,6 +1348,8 @@ namespace Aaru.Server.Database.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<byte?>("BlockSizeGranularity") b.Property<byte?>("BlockSizeGranularity")
.HasColumnType("tinyint unsigned"); .HasColumnType("tinyint unsigned");
@@ -1335,6 +1370,8 @@ namespace Aaru.Server.Database.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<string>("Description") b.Property<string>("Description")
.HasColumnType("longtext"); .HasColumnType("longtext");
@@ -1374,6 +1411,8 @@ namespace Aaru.Server.Database.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<uint>("BitsPerMm") b.Property<uint>("BitsPerMm")
.HasColumnType("int unsigned"); .HasColumnType("int unsigned");
@@ -1431,6 +1470,8 @@ namespace Aaru.Server.Database.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<byte[]>("AdipData") b.Property<byte[]>("AdipData")
.HasColumnType("longblob"); .HasColumnType("longblob");
@@ -1644,6 +1685,9 @@ namespace Aaru.Server.Database.Migrations
b.Property<byte[]>("LeadOutData") b.Property<byte[]>("LeadOutData")
.HasColumnType("longblob"); .HasColumnType("longblob");
b.Property<byte[]>("LiteOnReadRawDVDData")
.HasColumnType("longblob");
b.Property<ushort?>("LogicalAlignment") b.Property<ushort?>("LogicalAlignment")
.HasColumnType("smallint unsigned"); .HasColumnType("smallint unsigned");
@@ -1806,6 +1850,9 @@ namespace Aaru.Server.Database.Migrations
b.Property<bool?>("SupportsHLDTSTReadRawDVD") b.Property<bool?>("SupportsHLDTSTReadRawDVD")
.HasColumnType("tinyint(1)"); .HasColumnType("tinyint(1)");
b.Property<bool?>("SupportsLiteOnReadRawDVD")
.HasColumnType("tinyint(1)");
b.Property<bool?>("SupportsNECReadCDDA") b.Property<bool?>("SupportsNECReadCDDA")
.HasColumnType("tinyint(1)"); .HasColumnType("tinyint(1)");
@@ -1935,6 +1982,8 @@ namespace Aaru.Server.Database.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<bool?>("CanReadMediaSerial") b.Property<bool?>("CanReadMediaSerial")
.HasColumnType("tinyint(1)"); .HasColumnType("tinyint(1)");
@@ -1978,6 +2027,8 @@ namespace Aaru.Server.Database.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<byte[]>("Descriptors") b.Property<byte[]>("Descriptors")
.HasColumnType("longblob"); .HasColumnType("longblob");
@@ -2007,10 +2058,13 @@ namespace Aaru.Server.Database.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<long>("Count") b.Property<long>("Count")
.HasColumnType("bigint"); .HasColumnType("bigint");
b.Property<string>("Name") b.Property<string>("Name")
.IsRequired()
.HasColumnType("longtext"); .HasColumnType("longtext");
b.HasKey("Id"); b.HasKey("Id");
@@ -2024,6 +2078,8 @@ namespace Aaru.Server.Database.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<DateTime>("AddedWhen") b.Property<DateTime>("AddedWhen")
.HasColumnType("datetime(6)"); .HasColumnType("datetime(6)");
@@ -2058,6 +2114,8 @@ namespace Aaru.Server.Database.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<int?>("ATAId") b.Property<int?>("ATAId")
.HasColumnType("int"); .HasColumnType("int");
@@ -2148,7 +2206,10 @@ namespace Aaru.Server.Database.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<string>("Bus") b.Property<string>("Bus")
.IsRequired()
.HasColumnType("longtext"); .HasColumnType("longtext");
b.Property<string>("Manufacturer") b.Property<string>("Manufacturer")
@@ -2176,10 +2237,13 @@ namespace Aaru.Server.Database.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<long>("Count") b.Property<long>("Count")
.HasColumnType("bigint"); .HasColumnType("bigint");
b.Property<string>("Name") b.Property<string>("Name")
.IsRequired()
.HasColumnType("longtext"); .HasColumnType("longtext");
b.HasKey("Id"); b.HasKey("Id");
@@ -2193,10 +2257,13 @@ namespace Aaru.Server.Database.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<long>("Count") b.Property<long>("Count")
.HasColumnType("bigint"); .HasColumnType("bigint");
b.Property<string>("Name") b.Property<string>("Name")
.IsRequired()
.HasColumnType("longtext"); .HasColumnType("longtext");
b.HasKey("Id"); b.HasKey("Id");
@@ -2210,6 +2277,8 @@ namespace Aaru.Server.Database.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<long>("Count") b.Property<long>("Count")
.HasColumnType("bigint"); .HasColumnType("bigint");
@@ -2217,6 +2286,7 @@ namespace Aaru.Server.Database.Migrations
.HasColumnType("tinyint(1)"); .HasColumnType("tinyint(1)");
b.Property<string>("Type") b.Property<string>("Type")
.IsRequired()
.HasColumnType("longtext"); .HasColumnType("longtext");
b.HasKey("Id"); b.HasKey("Id");
@@ -2230,10 +2300,13 @@ namespace Aaru.Server.Database.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<long>("Count") b.Property<long>("Count")
.HasColumnType("bigint"); .HasColumnType("bigint");
b.Property<string>("Name") b.Property<string>("Name")
.IsRequired()
.HasColumnType("longtext"); .HasColumnType("longtext");
b.HasKey("Id"); b.HasKey("Id");
@@ -2247,6 +2320,8 @@ namespace Aaru.Server.Database.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<DateTime>("AddedWhen") b.Property<DateTime>("AddedWhen")
.HasColumnType("datetime(6)"); .HasColumnType("datetime(6)");
@@ -2307,10 +2382,13 @@ namespace Aaru.Server.Database.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<long>("Count") b.Property<long>("Count")
.HasColumnType("bigint"); .HasColumnType("bigint");
b.Property<string>("Name") b.Property<string>("Name")
.IsRequired()
.HasColumnType("longtext"); .HasColumnType("longtext");
b.Property<string>("Version") b.Property<string>("Version")
@@ -2327,10 +2405,13 @@ namespace Aaru.Server.Database.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<long>("Count") b.Property<long>("Count")
.HasColumnType("bigint"); .HasColumnType("bigint");
b.Property<string>("Name") b.Property<string>("Name")
.IsRequired()
.HasColumnType("longtext"); .HasColumnType("longtext");
b.HasKey("Id"); b.HasKey("Id");
@@ -2344,10 +2425,13 @@ namespace Aaru.Server.Database.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<long>("Count") b.Property<long>("Count")
.HasColumnType("bigint"); .HasColumnType("bigint");
b.Property<string>("Name") b.Property<string>("Name")
.IsRequired()
.HasColumnType("longtext"); .HasColumnType("longtext");
b.Property<string>("Version") b.Property<string>("Version")
@@ -2364,10 +2448,13 @@ namespace Aaru.Server.Database.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<long>("Count") b.Property<long>("Count")
.HasColumnType("bigint"); .HasColumnType("bigint");
b.Property<string>("Name") b.Property<string>("Name")
.IsRequired()
.HasColumnType("longtext"); .HasColumnType("longtext");
b.HasKey("Id"); b.HasKey("Id");
@@ -2381,10 +2468,13 @@ namespace Aaru.Server.Database.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<long>("Count") b.Property<long>("Count")
.HasColumnType("bigint"); .HasColumnType("bigint");
b.Property<string>("Name") b.Property<string>("Name")
.IsRequired()
.HasColumnType("longtext"); .HasColumnType("longtext");
b.Property<string>("Version") b.Property<string>("Version")
@@ -2401,6 +2491,8 @@ namespace Aaru.Server.Database.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<int?>("ATAId") b.Property<int?>("ATAId")
.HasColumnType("int"); .HasColumnType("int");
@@ -2475,6 +2567,8 @@ namespace Aaru.Server.Database.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<DateTime>("AddedWhen") b.Property<DateTime>("AddedWhen")
.HasColumnType("datetime(6)"); .HasColumnType("datetime(6)");
@@ -2482,6 +2576,7 @@ namespace Aaru.Server.Database.Migrations
.HasColumnType("datetime(6)"); .HasColumnType("datetime(6)");
b.Property<string>("Product") b.Property<string>("Product")
.IsRequired()
.HasColumnType("longtext"); .HasColumnType("longtext");
b.Property<ushort>("ProductId") b.Property<ushort>("ProductId")
@@ -2507,6 +2602,8 @@ namespace Aaru.Server.Database.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<DateTime>("AddedWhen") b.Property<DateTime>("AddedWhen")
.HasColumnType("datetime(6)"); .HasColumnType("datetime(6)");
@@ -2514,6 +2611,7 @@ namespace Aaru.Server.Database.Migrations
.HasColumnType("datetime(6)"); .HasColumnType("datetime(6)");
b.Property<string>("Vendor") b.Property<string>("Vendor")
.IsRequired()
.HasColumnType("longtext"); .HasColumnType("longtext");
b.Property<ushort>("VendorId") b.Property<ushort>("VendorId")
@@ -2535,10 +2633,13 @@ namespace Aaru.Server.Database.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<long>("Count") b.Property<long>("Count")
.HasColumnType("bigint"); .HasColumnType("bigint");
b.Property<string>("Name") b.Property<string>("Name")
.IsRequired()
.HasColumnType("longtext"); .HasColumnType("longtext");
b.HasKey("Id"); b.HasKey("Id");
@@ -2578,6 +2679,8 @@ namespace Aaru.Server.Database.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<string>("ClaimType") b.Property<string>("ClaimType")
.HasColumnType("longtext"); .HasColumnType("longtext");
@@ -2665,6 +2768,8 @@ namespace Aaru.Server.Database.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<string>("ClaimType") b.Property<string>("ClaimType")
.HasColumnType("longtext"); .HasColumnType("longtext");
@@ -2685,12 +2790,10 @@ namespace Aaru.Server.Database.Migrations
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b => modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
{ {
b.Property<string>("LoginProvider") b.Property<string>("LoginProvider")
.HasMaxLength(128) .HasColumnType("varchar(255)");
.HasColumnType("varchar(128)");
b.Property<string>("ProviderKey") b.Property<string>("ProviderKey")
.HasMaxLength(128) .HasColumnType("varchar(255)");
.HasColumnType("varchar(128)");
b.Property<string>("ProviderDisplayName") b.Property<string>("ProviderDisplayName")
.HasColumnType("longtext"); .HasColumnType("longtext");
@@ -2727,12 +2830,10 @@ namespace Aaru.Server.Database.Migrations
.HasColumnType("varchar(255)"); .HasColumnType("varchar(255)");
b.Property<string>("LoginProvider") b.Property<string>("LoginProvider")
.HasMaxLength(128) .HasColumnType("varchar(255)");
.HasColumnType("varchar(128)");
b.Property<string>("Name") b.Property<string>("Name")
.HasMaxLength(128) .HasColumnType("varchar(255)");
.HasColumnType("varchar(128)");
b.Property<string>("Value") b.Property<string>("Value")
.HasColumnType("longtext"); .HasColumnType("longtext");

View File

@@ -36,11 +36,11 @@ using Aaru.CommonTypes.Metadata;
namespace Aaru.Server.Database.Models; namespace Aaru.Server.Database.Models;
public class Device : DeviceReportV2 public class Device : DeviceReport
{ {
public Device() => AddedWhen = DateTime.UtcNow; public Device() => AddedWhen = DateTime.UtcNow;
public Device(DeviceReportV2 report) public Device(DeviceReport report)
{ {
ATA = report.ATA; ATA = report.ATA;
ATAPI = report.ATAPI; ATAPI = report.ATAPI;

View File

@@ -35,11 +35,11 @@ using Aaru.CommonTypes.Metadata;
namespace Aaru.Server.Database.Models; namespace Aaru.Server.Database.Models;
public class UploadedReport : DeviceReportV2 public class UploadedReport : DeviceReport
{ {
public UploadedReport() => UploadedWhen = DateTime.UtcNow; public UploadedReport() => UploadedWhen = DateTime.UtcNow;
public UploadedReport(DeviceReportV2 report) public UploadedReport(DeviceReport report)
{ {
ATA = report.ATA; ATA = report.ATA;
ATAPI = report.ATAPI; ATAPI = report.ATAPI;

View File

@@ -8,9 +8,9 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Aaru.CommonTypes" Version="6.0.0-alpha8"/> <PackageReference Include="Aaru.CommonTypes" Version="6.0.0-alpha10"/>
<PackageReference Include="Aaru.Decoders" Version="6.0.0-alpha8"/> <PackageReference Include="Aaru.Decoders" Version="6.0.0-alpha10"/>
<PackageReference Include="Aaru.Dto" Version="6.0.0-alpha8"/> <PackageReference Include="Aaru.Dto" Version="6.0.0-alpha10"/>
<PackageReference Include="Blazorise.Bootstrap5" Version="1.5.2"/> <PackageReference Include="Blazorise.Bootstrap5" Version="1.5.2"/>
<PackageReference Include="Blazorise.Charts" Version="1.5.2"/> <PackageReference Include="Blazorise.Charts" Version="1.5.2"/>
<PackageReference Include="Blazorise.DataGrid" Version="1.5.2"/> <PackageReference Include="Blazorise.DataGrid" Version="1.5.2"/>
@@ -37,4 +37,10 @@
<ProjectReference Include="..\Aaru.Server.Database\Aaru.Server.Database.csproj"/> <ProjectReference Include="..\Aaru.Server.Database\Aaru.Server.Database.csproj"/>
</ItemGroup> </ItemGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json">
<HintPath>..\..\..\..\.nuget\packages\newtonsoft.json\13.0.1\lib\netstandard2.0\Newtonsoft.Json.dll</HintPath>
</Reference>
</ItemGroup>
</Project> </Project>

View File

@@ -58,12 +58,13 @@ public sealed class UpdateController(DbContext ctx) : ControllerBase
{ {
sync.Devices.Add(new sync.Devices.Add(new
DeviceDto(JsonConvert DeviceDto(JsonConvert
.DeserializeObject<DeviceReportV2>(JsonConvert.SerializeObject(device, .DeserializeObject<DeviceReport>(JsonConvert.SerializeObject(device,
Formatting.None, Formatting.None,
new JsonSerializerSettings new JsonSerializerSettings
{ {
ReferenceLoopHandling = ReferenceLoopHandling =
ReferenceLoopHandling.Ignore ReferenceLoopHandling
.Ignore
})), })),
device.Id, device.Id,
device.OptimalMultipleSectorsRead, device.OptimalMultipleSectorsRead,

View File

@@ -33,7 +33,6 @@
using System.Diagnostics; using System.Diagnostics;
using System.Net; using System.Net;
using System.Text; using System.Text;
using System.Xml.Serialization;
using Aaru.CommonTypes.Metadata; using Aaru.CommonTypes.Metadata;
using Aaru.Server.Database.Models; using Aaru.Server.Database.Models;
using Cinchoo.PGP; using Cinchoo.PGP;
@@ -65,59 +64,14 @@ public sealed class UploadReportController : ControllerBase
{ {
var response = new ContentResult var response = new ContentResult
{ {
StatusCode = (int)HttpStatusCode.OK, StatusCode = (int)HttpStatusCode.InternalServerError,
ContentType = "text/plain" ContentType = "text/plain",
Content = "error"
}; };
try
{
var newReport = new DeviceReport();
HttpRequest request = HttpContext.Request;
var xs = new XmlSerializer(newReport.GetType());
newReport =
(DeviceReport)xs.Deserialize(new StringReader(await new StreamReader(request.Body).ReadToEndAsync()));
if(newReport == null)
{
response.Content = "notstats";
return response; return response;
} }
var reportV2 = new DeviceReportV2(newReport);
var jsonSw = new StringWriter();
await jsonSw.WriteAsync(JsonConvert.SerializeObject(reportV2,
Formatting.Indented,
new JsonSerializerSettings
{
NullValueHandling = NullValueHandling.Ignore
}));
var reportV2String = jsonSw.ToString();
jsonSw.Close();
await SaveReport(reportV2, reportV2String);
response.Content = "ok";
return response;
}
// ReSharper disable once RedundantCatchClause
catch
{
#if DEBUG
if(Debugger.IsAttached) throw;
#endif
response.Content = "error";
return response;
}
}
/// <summary>Receives a report from Aaru.Core, verifies it's in the correct format and stores it on the server</summary> /// <summary>Receives a report from Aaru.Core, verifies it's in the correct format and stores it on the server</summary>
/// <returns>HTTP response</returns> /// <returns>HTTP response</returns>
[Route("api/uploadreportv2")] [Route("api/uploadreportv2")]
@@ -136,7 +90,7 @@ public sealed class UploadReportController : ControllerBase
var sr = new StreamReader(request.Body); var sr = new StreamReader(request.Body);
string reportJson = await sr.ReadToEndAsync(); string reportJson = await sr.ReadToEndAsync();
DeviceReportV2 newReport = JsonConvert.DeserializeObject<DeviceReportV2>(reportJson); DeviceReport newReport = JsonConvert.DeserializeObject<DeviceReport>(reportJson);
if(newReport == null) if(newReport == null)
{ {
@@ -164,7 +118,7 @@ public sealed class UploadReportController : ControllerBase
} }
} }
async Task SaveReport(DeviceReportV2 newReport, string reportJson) async Task SaveReport(DeviceReport newReport, string reportJson)
{ {
var newUploadedReport = new UploadedReport(newReport); var newUploadedReport = new UploadedReport(newReport);

View File

@@ -266,13 +266,13 @@ public sealed class UploadStatsController : ControllerBase
foreach(MediaStats media in newstats.Medias) foreach(MediaStats media in newstats.Medias)
{ {
Media? existing = Media? existing =
await _ctx.Medias.FirstOrDefaultAsync(c => c.Type == media.type && c.Real == media.real); await _ctx.Medias.FirstOrDefaultAsync(c => c.Type == media.MediaType && c.Real == media.real);
if(existing == null) if(existing == null)
{ {
_ctx.Medias.Add(new Media _ctx.Medias.Add(new Media
{ {
Type = media.type, Type = media.MediaType,
Real = media.real, Real = media.real,
Count = media.Value Count = media.Value
}); });

View File

@@ -566,10 +566,10 @@ public static class StatsConverter
{ {
foreach(MediaStats media in newStats.Medias) foreach(MediaStats media in newStats.Medias)
{ {
if(string.IsNullOrWhiteSpace(media.type)) continue; if(string.IsNullOrWhiteSpace(media.MediaType)) continue;
Media? existing = Media? existing =
await ctx.Medias.FirstOrDefaultAsync(c => c.Type == media.type && c.Real == media.real); await ctx.Medias.FirstOrDefaultAsync(c => c.Type == media.MediaType && c.Real == media.real);
if(existing == null) if(existing == null)
{ {
@@ -577,7 +577,7 @@ public static class StatsConverter
{ {
Count = media.Value, Count = media.Value,
Real = media.real, Real = media.real,
Type = media.type Type = media.MediaType
}); });
} }
else else