Change CanReadGdRomUsingSwapDisc to nullable.

This commit is contained in:
2020-07-10 20:29:47 +01:00
parent 7f755a12f9
commit 647ea6f0bf
7 changed files with 2480 additions and 4 deletions

View File

@@ -416,6 +416,8 @@
<e p="20200710164101_AddCanReadGdRomUsingSwapDisc.cs" t="Include" />
<e p="20200710170129_AddGdRomSwapDiscCapabilities.Designer.cs" t="Include" />
<e p="20200710170129_AddGdRomSwapDiscCapabilities.cs" t="Include" />
<e p="20200710192426_MakeCanReadGdRomUsingSwapDiscNullable.Designer.cs" t="Include" />
<e p="20200710192426_MakeCanReadGdRomUsingSwapDiscNullable.cs" t="Include" />
<e p="AaruContextModelSnapshot.cs" t="Include" />
</e>
<e p="Models" t="Include">

View File

@@ -114,6 +114,8 @@
<Compile Include="Migrations\20200710164101_AddCanReadGdRomUsingSwapDisc.Designer.cs" />
<Compile Include="Migrations\20200710170129_AddGdRomSwapDiscCapabilities.cs" />
<Compile Include="Migrations\20200710170129_AddGdRomSwapDiscCapabilities.Designer.cs" />
<Compile Include="Migrations\20200710192426_MakeCanReadGdRomUsingSwapDiscNullable.cs" />
<Compile Include="Migrations\20200710192426_MakeCanReadGdRomUsingSwapDiscNullable.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,15 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace Aaru.Database.Migrations
{
public partial class MakeCanReadGdRomUsingSwapDiscNullable : Migration
{
protected override void Up(MigrationBuilder migrationBuilder) =>
migrationBuilder.AlterColumn<bool>("CanReadGdRomUsingSwapDisc", "Devices", nullable: true,
oldClrType: typeof(bool), oldType: "INTEGER");
protected override void Down(MigrationBuilder migrationBuilder) =>
migrationBuilder.AlterColumn<bool>("CanReadGdRomUsingSwapDisc", "Devices", "INTEGER", nullable: false,
oldClrType: typeof(bool), oldNullable: true);
}
}

View File

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

View File

@@ -64,7 +64,7 @@ namespace Aaru.Database.Models
[DefaultValue(0)]
public int OptimalMultipleSectorsRead { get; set; }
[DefaultValue(false)]
public bool CanReadGdRomUsingSwapDisc { get; set; }
[DefaultValue(null)]
public bool? CanReadGdRomUsingSwapDisc { get; set; }
}
}