Fix NES header database hash field length.

This commit is contained in:
2021-12-08 21:46:39 +00:00
parent 8c5766ad88
commit fbd93d8e28
6 changed files with 10 additions and 8 deletions

View File

@@ -1,7 +1,7 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Aaru" type="DotNetProject" factoryName=".NET Project">
<option name="EXE_PATH" value="$PROJECT_DIR$/Aaru/bin/Debug/net6/aaru" />
<option name="PROGRAM_PARAMETERS" value="i info &quot;Jimmy Connors' Tennis (USA, Europe).lnx&quot;" />
<option name="PROGRAM_PARAMETERS" value="i info &quot;Addams Family Values (Europe) (En,Fr,De).sfc&quot;" />
<option name="WORKING_DIRECTORY" value="$USER_HOME$/Desktop" />
<option name="PASS_PARENT_ENVS" value="1" />
<option name="USE_EXTERNAL_CONSOLE" value="0" />

View File

@@ -137,8 +137,8 @@
<Compile Include="Migrations\20200711182425_AddFieldsForF1hCommand06hSubcommand.Designer.cs" />
<Compile Include="Migrations\20200711230202_FixGdRomCapabilitiesFieldName.cs" />
<Compile Include="Migrations\20200711230202_FixGdRomCapabilitiesFieldName.Designer.cs" />
<Compile Include="Migrations\20211208202937_AddNesHeaders.cs" />
<Compile Include="Migrations\20211208202937_AddNesHeaders.Designer.cs" />
<Compile Include="Migrations\20211208214543_AddNesHeaders.cs" />
<Compile Include="Migrations\20211208214543_AddNesHeaders.Designer.cs" />
<Compile Include="Migrations\AaruContextModelSnapshot.cs" />
<Compile Include="Models\BaseModel.cs" />
<Compile Include="Models\BaseOperatingSystem.cs" />

View File

@@ -11,7 +11,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace Aaru.Database.Migrations
{
[DbContext(typeof(AaruContext))]
[Migration("20211208202937_AddNesHeaders")]
[Migration("20211208214543_AddNesHeaders")]
partial class AddNesHeaders
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
@@ -2279,7 +2279,8 @@ namespace Aaru.Database.Migrations
.HasColumnType("INTEGER");
b.Property<string>("Sha256")
.HasMaxLength(32)
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property<byte>("Submapper")

View File

@@ -15,7 +15,7 @@ namespace Aaru.Database.Migrations
{
Id = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
Sha256 = table.Column<string>(type: "TEXT", maxLength: 32, nullable: true),
Sha256 = table.Column<string>(type: "TEXT", maxLength: 64, nullable: false),
NametableMirroring = table.Column<bool>(type: "INTEGER", nullable: false),
BatteryPresent = table.Column<bool>(type: "INTEGER", nullable: false),
FourScreenMode = table.Column<bool>(type: "INTEGER", nullable: false),

View File

@@ -2277,7 +2277,8 @@ namespace Aaru.Database.Migrations
.HasColumnType("INTEGER");
b.Property<string>("Sha256")
.HasMaxLength(32)
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property<byte>("Submapper")

View File

@@ -8,7 +8,7 @@ namespace Aaru.Database.Models;
public class NesHeaderInfo : BaseModel
{
/// <summary>ROM hash</summary>
[StringLength(32)]
[StringLength(64), Required]
public string Sha256 { get; set; }
/// <summary>If <c>true</c> vertical mirroring is hard-wired, horizontal or mapper defined otherwise</summary>
public bool NametableMirroring { get; set; }