Add field to indicate if a device can read GD-ROM discs using swap trick.

This commit is contained in:
2020-07-10 17:48:22 +01:00
parent 5216ec5eb3
commit ab35e58984
8 changed files with 2136 additions and 4 deletions

View File

@@ -412,6 +412,8 @@
<e p="20191207184342_AddRemoteStats.cs" t="Include" />
<e p="20200710140320_FixIndexes.Designer.cs" t="Include" />
<e p="20200710140320_FixIndexes.cs" t="Include" />
<e p="20200710164101_AddCanReadGdRomUsingSwapDisc.Designer.cs" t="Include" />
<e p="20200710164101_AddCanReadGdRomUsingSwapDisc.cs" t="Include" />
<e p="AaruContextModelSnapshot.cs" t="Include" />
</e>
<e p="Models" t="Include">

View File

@@ -1,4 +1,4 @@
// /***************************************************************************
// /***************************************************************************
// Aaru Data Preservation Suite
// ----------------------------------------------------------------------------
//
@@ -332,7 +332,8 @@ namespace Aaru.Core
existing = new Device(device)
{
Id = device.Id, OptimalMultipleSectorsRead = device.OptimalMultipleSectorsRead
Id = device.Id, OptimalMultipleSectorsRead = device.OptimalMultipleSectorsRead,
CanReadGdRomUsingSwapDisc = device.CanReadGdRomUsingSwapDisc
};
mctx.Devices.Add(existing);
@@ -343,7 +344,8 @@ namespace Aaru.Core
mctx.Devices.Add(new Device(device)
{
Id = device.Id, OptimalMultipleSectorsRead = device.OptimalMultipleSectorsRead
Id = device.Id, OptimalMultipleSectorsRead = device.OptimalMultipleSectorsRead,
CanReadGdRomUsingSwapDisc = device.CanReadGdRomUsingSwapDisc
});
}
}

View File

@@ -110,6 +110,8 @@
<Compile Include="Migrations\20191207184342_AddRemoteStats.Designer.cs" />
<Compile Include="Migrations\20200710140320_FixIndexes.cs" />
<Compile Include="Migrations\20200710140320_FixIndexes.Designer.cs" />
<Compile Include="Migrations\20200710164101_AddCanReadGdRomUsingSwapDisc.cs" />
<Compile Include="Migrations\20200710164101_AddCanReadGdRomUsingSwapDisc.Designer.cs" />
<Compile Include="Migrations\AaruContextModelSnapshot.cs" />
<Compile Include="Models\BaseModel.cs" />
<Compile Include="Models\BaseOperatingSystem.cs" />

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,14 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace Aaru.Database.Migrations
{
public partial class AddCanReadGdRomUsingSwapDisc : Migration
{
protected override void Up(MigrationBuilder migrationBuilder) =>
migrationBuilder.AddColumn<bool>("CanReadGdRomUsingSwapDisc", "Devices", nullable: false,
defaultValue: false);
protected override void Down(MigrationBuilder migrationBuilder) =>
migrationBuilder.DropColumn("CanReadGdRomUsingSwapDisc", "Devices");
}
}

View File

@@ -1016,6 +1016,8 @@ namespace Aaru.Database.Migrations
b.Property<int?>("ATAPIId").HasColumnType("INTEGER");
b.Property<bool>("CanReadGdRomUsingSwapDisc").HasColumnType("INTEGER");
b.Property<bool>("CompactFlash").HasColumnType("INTEGER");
b.Property<int?>("FireWireId").HasColumnType("INTEGER");

View File

@@ -62,5 +62,8 @@ namespace Aaru.Database.Models
[DefaultValue(0)]
public int OptimalMultipleSectorsRead { get; set; }
[DefaultValue(false)]
public bool CanReadGdRomUsingSwapDisc { get; set; }
}
}