Fix generated migrations

This commit is contained in:
Pat Hartl 2026-05-16 17:16:16 -05:00
parent f3cdc4b5ab
commit c53a99b0ac
5 changed files with 6625 additions and 9 deletions

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,4 +1,4 @@
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable

View file

@ -127,10 +127,10 @@ namespace LANCommander.Migrations
b.Property<Guid>("GameId")
.HasColumnType("TEXT");
b.Property<string>("Options")
b.Property<Guid>("RedistributableId")
.HasColumnType("TEXT");
b.Property<Guid>("RedistributableId")
b.Property<string>("Options")
.HasColumnType("TEXT");
b.HasKey("GameId", "RedistributableId");
@ -544,9 +544,6 @@ namespace LANCommander.Migrations
b.Property<Guid?>("EngineId")
.HasColumnType("TEXT");
b.Property<long?>("IGDBId")
.HasColumnType("INTEGER");
b.Property<int>("KeyAllocationMethod")
.HasColumnType("INTEGER");
@ -633,6 +630,48 @@ namespace LANCommander.Migrations
b.ToTable("GameCustomField");
});
modelBuilder.Entity("LANCommander.Server.Data.Models.GameExternalId", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property<Guid?>("CreatedById")
.HasColumnType("TEXT");
b.Property<DateTime>("CreatedOn")
.HasColumnType("TEXT");
b.Property<string>("ExternalId")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("TEXT");
b.Property<Guid?>("GameId")
.HasColumnType("TEXT");
b.Property<string>("Provider")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property<Guid?>("UpdatedById")
.HasColumnType("TEXT");
b.Property<DateTime>("UpdatedOn")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("CreatedById");
b.HasIndex("GameId");
b.HasIndex("UpdatedById");
b.ToTable("GameExternalIds");
});
modelBuilder.Entity("LANCommander.Server.Data.Models.GameSave", b =>
{
b.Property<Guid>("Id")
@ -877,13 +916,13 @@ namespace LANCommander.Migrations
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property<int>("SortOrder")
.HasColumnType("INTEGER");
b.Property<string>("SourceUrl")
.HasMaxLength(2048)
.HasColumnType("TEXT");
b.Property<int>("SortOrder")
.HasColumnType("INTEGER");
b.Property<Guid>("StorageLocationId")
.HasColumnType("TEXT");
@ -2378,6 +2417,30 @@ namespace LANCommander.Migrations
b.Navigation("UpdatedBy");
});
modelBuilder.Entity("LANCommander.Server.Data.Models.GameExternalId", b =>
{
b.HasOne("LANCommander.Server.Data.Models.User", "CreatedBy")
.WithMany()
.HasForeignKey("CreatedById")
.OnDelete(DeleteBehavior.SetNull);
b.HasOne("LANCommander.Server.Data.Models.Game", "Game")
.WithMany("ExternalIds")
.HasForeignKey("GameId")
.OnDelete(DeleteBehavior.Cascade);
b.HasOne("LANCommander.Server.Data.Models.User", "UpdatedBy")
.WithMany()
.HasForeignKey("UpdatedById")
.OnDelete(DeleteBehavior.SetNull);
b.Navigation("CreatedBy");
b.Navigation("Game");
b.Navigation("UpdatedBy");
});
modelBuilder.Entity("LANCommander.Server.Data.Models.GameSave", b =>
{
b.HasOne("LANCommander.Server.Data.Models.User", "CreatedBy")
@ -3117,6 +3180,8 @@ namespace LANCommander.Migrations
b.Navigation("DependentGames");
b.Navigation("ExternalIds");
b.Navigation("GameSaves");
b.Navigation("Issues");