Skip to content

Commit

Permalink
Fix NES header database hash field length.
Browse files Browse the repository at this point in the history
  • Loading branch information
claunia committed Dec 8, 2021
1 parent 8c5766a commit fbd93d8
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .idea/.idea.Aaru/.idea/runConfigurations/Aaru.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Aaru.Database/Aaru.Database.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -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" />
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
{
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),
Expand Down
3 changes: 2 additions & 1 deletion Aaru.Database/Migrations/AaruContextModelSnapshot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2277,7 +2277,8 @@ protected override void BuildModel(ModelBuilder modelBuilder)
.HasColumnType("INTEGER");

b.Property<string>("Sha256")
.HasMaxLength(32)
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");

b.Property<byte>("Submapper")
Expand Down
2 changes: 1 addition & 1 deletion Aaru.Database/Models/NesHeaderInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down

0 comments on commit fbd93d8

Please sign in to comment.