From dfafe89e7977ea2afadda3a5079e3ceb66cf6e7f Mon Sep 17 00:00:00 2001 From: dingo Date: Sat, 14 Mar 2026 08:26:46 -0400 Subject: [PATCH] Fix: regenerate EF migrations with proper Designer.cs files Replaced linter-generated stubs (missing [Migration] attribute and Designer.cs snapshots) with correctly generated migrations. Applied to production (pg-forge-01). Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude Co-Authored-By: Happy --- .../20260313000002_AddCardActionSounds.cs | 29 -- .../20260313000003_AddGameAudioConfig.cs | 43 -- ...0314122155_AddCardActionSounds.Designer.cs | 442 ++++++++++++++++++ .../20260314122155_AddCardActionSounds.cs | 75 +++ ...60314122217_AddGameAudioConfig.Designer.cs | 442 ++++++++++++++++++ .../20260314122217_AddGameAudioConfig.cs | 22 + .../Catalog/CatalogDbContextModelSnapshot.cs | 68 +-- ...60314122128_AddLeaderboardHide.Designer.cs | 413 ++++++++++++++++ ...s => 20260314122128_AddLeaderboardHide.cs} | 2 +- 9 files changed, 1429 insertions(+), 107 deletions(-) delete mode 100644 Server/src/SOR.Database/Migrations/Catalog/20260313000002_AddCardActionSounds.cs delete mode 100644 Server/src/SOR.Database/Migrations/Catalog/20260313000003_AddGameAudioConfig.cs create mode 100644 Server/src/SOR.Database/Migrations/Catalog/20260314122155_AddCardActionSounds.Designer.cs create mode 100644 Server/src/SOR.Database/Migrations/Catalog/20260314122155_AddCardActionSounds.cs create mode 100644 Server/src/SOR.Database/Migrations/Catalog/20260314122217_AddGameAudioConfig.Designer.cs create mode 100644 Server/src/SOR.Database/Migrations/Catalog/20260314122217_AddGameAudioConfig.cs create mode 100644 Server/src/SOR.Database/Migrations/Identity/20260314122128_AddLeaderboardHide.Designer.cs rename Server/src/SOR.Database/Migrations/Identity/{20260313000001_AddLeaderboardHide.cs => 20260314122128_AddLeaderboardHide.cs} (94%) diff --git a/Server/src/SOR.Database/Migrations/Catalog/20260313000002_AddCardActionSounds.cs b/Server/src/SOR.Database/Migrations/Catalog/20260313000002_AddCardActionSounds.cs deleted file mode 100644 index 5d6dd3b..0000000 --- a/Server/src/SOR.Database/Migrations/Catalog/20260313000002_AddCardActionSounds.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace SOR.Database.Migrations.Catalog; - -using Microsoft.EntityFrameworkCore.Migrations; - -public partial class AddCardActionSounds : Migration -{ - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "CastSoundCdnUrl", - schema: "catalog", - table: "card_animation_bindings", - type: "text", - nullable: true); - - migrationBuilder.AddColumn( - name: "ImpactSoundCdnUrl", - schema: "catalog", - table: "card_animation_bindings", - type: "text", - nullable: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn(name: "CastSoundCdnUrl", schema: "catalog", table: "card_animation_bindings"); - migrationBuilder.DropColumn(name: "ImpactSoundCdnUrl", schema: "catalog", table: "card_animation_bindings"); - } -} diff --git a/Server/src/SOR.Database/Migrations/Catalog/20260313000003_AddGameAudioConfig.cs b/Server/src/SOR.Database/Migrations/Catalog/20260313000003_AddGameAudioConfig.cs deleted file mode 100644 index fa17edc..0000000 --- a/Server/src/SOR.Database/Migrations/Catalog/20260313000003_AddGameAudioConfig.cs +++ /dev/null @@ -1,43 +0,0 @@ -namespace SOR.Database.Migrations.Catalog; - -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -public partial class AddGameAudioConfig : Migration -{ - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "game_audio_configs", - schema: "catalog", - columns: table => new - { - Id = table.Column(type: "uuid", nullable: false), - Context = table.Column(type: "text", nullable: false), - TrackName = table.Column(type: "text", nullable: false), - TrackCdnUrl = table.Column(type: "text", nullable: false), - IsActive = table.Column(type: "boolean", nullable: false, defaultValue: true), - }, - constraints: table => - { - table.PrimaryKey("PK_game_audio_configs", x => x.Id); - }); - - migrationBuilder.CreateIndex( - name: "IX_game_audio_configs_Context", - schema: "catalog", - table: "game_audio_configs", - column: "Context"); - - migrationBuilder.CreateIndex( - name: "IX_game_audio_configs_IsActive", - schema: "catalog", - table: "game_audio_configs", - column: "IsActive"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable(name: "game_audio_configs", schema: "catalog"); - } -} diff --git a/Server/src/SOR.Database/Migrations/Catalog/20260314122155_AddCardActionSounds.Designer.cs b/Server/src/SOR.Database/Migrations/Catalog/20260314122155_AddCardActionSounds.Designer.cs new file mode 100644 index 0000000..a35b114 --- /dev/null +++ b/Server/src/SOR.Database/Migrations/Catalog/20260314122155_AddCardActionSounds.Designer.cs @@ -0,0 +1,442 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; +using SOR.Database.Contexts; + +#nullable disable + +namespace SOR.Database.Migrations.Catalog +{ + [DbContext(typeof(CatalogDbContext))] + [Migration("20260314122155_AddCardActionSounds")] + partial class AddCardActionSounds + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasDefaultSchema("catalog") + .HasAnnotation("ProductVersion", "8.0.0") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + + modelBuilder.Entity("SOR.Database.Entities.Catalog.CardAnimationBinding", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("ActionName") + .IsRequired() + .HasColumnType("text"); + + b.Property("AnimationCdnUrl") + .IsRequired() + .HasColumnType("text"); + + b.Property("CardDefinitionId") + .HasColumnType("uuid"); + + b.Property("CastSoundCdnUrl") + .HasColumnType("text"); + + b.Property("ImpactSoundCdnUrl") + .HasColumnType("text"); + + b.Property("IsAiGenerated") + .HasColumnType("boolean"); + + b.HasKey("Id"); + + b.HasIndex("CardDefinitionId", "ActionName") + .IsUnique(); + + b.ToTable("card_animation_bindings", "catalog"); + }); + + modelBuilder.Entity("SOR.Database.Entities.Catalog.CardAsset", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("AssetType") + .IsRequired() + .HasColumnType("text"); + + b.Property("CardDefinitionId") + .HasColumnType("uuid"); + + b.Property("CdnUrl") + .IsRequired() + .HasColumnType("text"); + + b.Property("CreatedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("IsAiGenerated") + .HasColumnType("boolean"); + + b.Property("MimeType") + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("CardDefinitionId", "AssetType"); + + b.ToTable("card_assets", "catalog"); + }); + + modelBuilder.Entity("SOR.Database.Entities.Catalog.CardDefinition", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("AbilitiesJson") + .HasColumnType("jsonb") + .HasColumnName("abilities"); + + b.Property("Affinity") + .IsRequired() + .HasColumnType("text"); + + b.Property("AttackType") + .HasColumnType("text"); + + b.Property("CanAttack") + .HasColumnType("boolean"); + + b.Property("CanBeAttacked") + .HasColumnType("boolean"); + + b.Property("CanBeBlocked") + .HasColumnType("boolean"); + + b.Property("CanBeObstructed") + .HasColumnType("boolean"); + + b.Property("CanBeSacrificed") + .HasColumnType("boolean"); + + b.Property("CanDefend") + .HasColumnType("boolean"); + + b.Property("CanMove") + .HasColumnType("boolean"); + + b.Property("CanUseAbility") + .HasColumnType("boolean"); + + b.Property("CardType") + .IsRequired() + .HasColumnType("text"); + + b.Property("CollectorNumber") + .HasColumnType("integer"); + + b.Property("CreatedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("Damage") + .HasColumnType("integer"); + + b.Property("DefinitionVersion") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L); + + b.Property("Description") + .IsRequired() + .HasColumnType("text"); + + b.Property("EffectsJson") + .HasColumnType("jsonb") + .HasColumnName("effects"); + + b.Property("Genus") + .HasColumnType("text[]"); + + b.Property("IsPublished") + .HasColumnType("boolean"); + + b.Property("IsRetired") + .HasColumnType("boolean"); + + b.Property("MaxAttackRange") + .HasColumnType("integer"); + + b.Property("MaxChannelRange") + .HasColumnType("integer"); + + b.Property("MaxDefense") + .HasColumnType("integer"); + + b.Property("MaxHealth") + .HasColumnType("integer"); + + b.Property("MinAttackRange") + .HasColumnType("integer"); + + b.Property("MinChannelRange") + .HasColumnType("integer"); + + b.Property("MovementPoints") + .HasColumnType("integer"); + + b.Property("MovementType") + .HasColumnType("text"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text"); + + b.Property("OtherCostsJson") + .HasColumnType("jsonb") + .HasColumnName("other_costs"); + + b.Property("PreviousTierId") + .HasColumnType("uuid"); + + b.Property("Rarity") + .IsRequired() + .HasColumnType("text"); + + b.Property("RequiresLos") + .HasColumnType("boolean"); + + b.Property("RetiredAt") + .HasColumnType("timestamp with time zone"); + + b.Property("SetId") + .HasColumnType("uuid"); + + b.Property("SpCost") + .HasColumnType("integer"); + + b.Property("StCost") + .HasColumnType("integer"); + + b.Property("TerramorphaMode") + .HasColumnType("text"); + + b.Property("Tier") + .HasColumnType("integer"); + + b.Property("UpdatedAt") + .HasColumnType("timestamp with time zone"); + + b.HasKey("Id"); + + b.HasIndex("Affinity"); + + b.HasIndex("CardType"); + + b.HasIndex("DefinitionVersion"); + + b.HasIndex("Name"); + + b.HasIndex("PreviousTierId"); + + b.HasIndex("Rarity"); + + b.HasIndex("SetId"); + + b.HasIndex("IsPublished", "SetId"); + + b.ToTable("card_definitions", "catalog"); + }); + + modelBuilder.Entity("SOR.Database.Entities.Catalog.CardSet", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("Code") + .IsRequired() + .HasColumnType("text"); + + b.Property("Description") + .HasColumnType("text"); + + b.Property("IsActive") + .HasColumnType("boolean"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text"); + + b.Property("ReleaseDate") + .HasColumnType("date"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("card_sets", "catalog"); + }); + + modelBuilder.Entity("SOR.Database.Entities.Catalog.CdnUploadRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("ContentType") + .HasColumnType("text"); + + b.Property("IsAiGenerated") + .HasColumnType("boolean"); + + b.Property("ObjectKey") + .IsRequired() + .HasColumnType("text"); + + b.Property("Prefix") + .IsRequired() + .HasColumnType("text"); + + b.Property("PublicUrl") + .IsRequired() + .HasColumnType("text"); + + b.Property("UploadedAt") + .HasColumnType("timestamp with time zone"); + + b.HasKey("Id"); + + b.HasIndex("IsAiGenerated"); + + b.HasIndex("ObjectKey") + .IsUnique(); + + b.HasIndex("Prefix"); + + b.ToTable("cdn_upload_records", "catalog"); + }); + + modelBuilder.Entity("SOR.Database.Entities.Catalog.GameAudioConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("Context") + .IsRequired() + .HasColumnType("text"); + + b.Property("IsActive") + .HasColumnType("boolean"); + + b.Property("TrackCdnUrl") + .IsRequired() + .HasColumnType("text"); + + b.Property("TrackName") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("Context"); + + b.HasIndex("IsActive"); + + b.ToTable("game_audio_configs", "catalog"); + }); + + modelBuilder.Entity("SOR.Database.Entities.Catalog.TileModelBinding", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("Affinity") + .IsRequired() + .HasColumnType("text"); + + b.Property("ModelCdnKey") + .IsRequired() + .HasColumnType("text"); + + b.Property("ModelPublicUrl") + .IsRequired() + .HasColumnType("text"); + + b.Property("Shape") + .IsRequired() + .HasColumnType("text"); + + b.Property("UpdatedAt") + .HasColumnType("timestamp with time zone"); + + b.HasKey("Id"); + + b.HasIndex("Affinity", "Shape") + .IsUnique(); + + b.ToTable("tile_model_bindings", "catalog"); + }); + + modelBuilder.Entity("SOR.Database.Entities.Catalog.CardAnimationBinding", b => + { + b.HasOne("SOR.Database.Entities.Catalog.CardDefinition", "CardDefinition") + .WithMany("AnimationBindings") + .HasForeignKey("CardDefinitionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CardDefinition"); + }); + + modelBuilder.Entity("SOR.Database.Entities.Catalog.CardAsset", b => + { + b.HasOne("SOR.Database.Entities.Catalog.CardDefinition", "CardDefinition") + .WithMany("Assets") + .HasForeignKey("CardDefinitionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CardDefinition"); + }); + + modelBuilder.Entity("SOR.Database.Entities.Catalog.CardDefinition", b => + { + b.HasOne("SOR.Database.Entities.Catalog.CardDefinition", "PreviousTier") + .WithMany() + .HasForeignKey("PreviousTierId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("SOR.Database.Entities.Catalog.CardSet", "Set") + .WithMany("Cards") + .HasForeignKey("SetId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("PreviousTier"); + + b.Navigation("Set"); + }); + + modelBuilder.Entity("SOR.Database.Entities.Catalog.CardDefinition", b => + { + b.Navigation("AnimationBindings"); + + b.Navigation("Assets"); + }); + + modelBuilder.Entity("SOR.Database.Entities.Catalog.CardSet", b => + { + b.Navigation("Cards"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Server/src/SOR.Database/Migrations/Catalog/20260314122155_AddCardActionSounds.cs b/Server/src/SOR.Database/Migrations/Catalog/20260314122155_AddCardActionSounds.cs new file mode 100644 index 0000000..f60ab3d --- /dev/null +++ b/Server/src/SOR.Database/Migrations/Catalog/20260314122155_AddCardActionSounds.cs @@ -0,0 +1,75 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace SOR.Database.Migrations.Catalog +{ + /// + public partial class AddCardActionSounds : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "CastSoundCdnUrl", + schema: "catalog", + table: "card_animation_bindings", + type: "text", + nullable: true); + + migrationBuilder.AddColumn( + name: "ImpactSoundCdnUrl", + schema: "catalog", + table: "card_animation_bindings", + type: "text", + nullable: true); + + migrationBuilder.CreateTable( + name: "game_audio_configs", + schema: "catalog", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + Context = table.Column(type: "text", nullable: false), + TrackName = table.Column(type: "text", nullable: false), + TrackCdnUrl = table.Column(type: "text", nullable: false), + IsActive = table.Column(type: "boolean", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_game_audio_configs", x => x.Id); + }); + + migrationBuilder.CreateIndex( + name: "IX_game_audio_configs_Context", + schema: "catalog", + table: "game_audio_configs", + column: "Context"); + + migrationBuilder.CreateIndex( + name: "IX_game_audio_configs_IsActive", + schema: "catalog", + table: "game_audio_configs", + column: "IsActive"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "game_audio_configs", + schema: "catalog"); + + migrationBuilder.DropColumn( + name: "CastSoundCdnUrl", + schema: "catalog", + table: "card_animation_bindings"); + + migrationBuilder.DropColumn( + name: "ImpactSoundCdnUrl", + schema: "catalog", + table: "card_animation_bindings"); + } + } +} diff --git a/Server/src/SOR.Database/Migrations/Catalog/20260314122217_AddGameAudioConfig.Designer.cs b/Server/src/SOR.Database/Migrations/Catalog/20260314122217_AddGameAudioConfig.Designer.cs new file mode 100644 index 0000000..f8a9776 --- /dev/null +++ b/Server/src/SOR.Database/Migrations/Catalog/20260314122217_AddGameAudioConfig.Designer.cs @@ -0,0 +1,442 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; +using SOR.Database.Contexts; + +#nullable disable + +namespace SOR.Database.Migrations.Catalog +{ + [DbContext(typeof(CatalogDbContext))] + [Migration("20260314122217_AddGameAudioConfig")] + partial class AddGameAudioConfig + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasDefaultSchema("catalog") + .HasAnnotation("ProductVersion", "8.0.0") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + + modelBuilder.Entity("SOR.Database.Entities.Catalog.CardAnimationBinding", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("ActionName") + .IsRequired() + .HasColumnType("text"); + + b.Property("AnimationCdnUrl") + .IsRequired() + .HasColumnType("text"); + + b.Property("CardDefinitionId") + .HasColumnType("uuid"); + + b.Property("CastSoundCdnUrl") + .HasColumnType("text"); + + b.Property("ImpactSoundCdnUrl") + .HasColumnType("text"); + + b.Property("IsAiGenerated") + .HasColumnType("boolean"); + + b.HasKey("Id"); + + b.HasIndex("CardDefinitionId", "ActionName") + .IsUnique(); + + b.ToTable("card_animation_bindings", "catalog"); + }); + + modelBuilder.Entity("SOR.Database.Entities.Catalog.CardAsset", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("AssetType") + .IsRequired() + .HasColumnType("text"); + + b.Property("CardDefinitionId") + .HasColumnType("uuid"); + + b.Property("CdnUrl") + .IsRequired() + .HasColumnType("text"); + + b.Property("CreatedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("IsAiGenerated") + .HasColumnType("boolean"); + + b.Property("MimeType") + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("CardDefinitionId", "AssetType"); + + b.ToTable("card_assets", "catalog"); + }); + + modelBuilder.Entity("SOR.Database.Entities.Catalog.CardDefinition", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("AbilitiesJson") + .HasColumnType("jsonb") + .HasColumnName("abilities"); + + b.Property("Affinity") + .IsRequired() + .HasColumnType("text"); + + b.Property("AttackType") + .HasColumnType("text"); + + b.Property("CanAttack") + .HasColumnType("boolean"); + + b.Property("CanBeAttacked") + .HasColumnType("boolean"); + + b.Property("CanBeBlocked") + .HasColumnType("boolean"); + + b.Property("CanBeObstructed") + .HasColumnType("boolean"); + + b.Property("CanBeSacrificed") + .HasColumnType("boolean"); + + b.Property("CanDefend") + .HasColumnType("boolean"); + + b.Property("CanMove") + .HasColumnType("boolean"); + + b.Property("CanUseAbility") + .HasColumnType("boolean"); + + b.Property("CardType") + .IsRequired() + .HasColumnType("text"); + + b.Property("CollectorNumber") + .HasColumnType("integer"); + + b.Property("CreatedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("Damage") + .HasColumnType("integer"); + + b.Property("DefinitionVersion") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L); + + b.Property("Description") + .IsRequired() + .HasColumnType("text"); + + b.Property("EffectsJson") + .HasColumnType("jsonb") + .HasColumnName("effects"); + + b.Property("Genus") + .HasColumnType("text[]"); + + b.Property("IsPublished") + .HasColumnType("boolean"); + + b.Property("IsRetired") + .HasColumnType("boolean"); + + b.Property("MaxAttackRange") + .HasColumnType("integer"); + + b.Property("MaxChannelRange") + .HasColumnType("integer"); + + b.Property("MaxDefense") + .HasColumnType("integer"); + + b.Property("MaxHealth") + .HasColumnType("integer"); + + b.Property("MinAttackRange") + .HasColumnType("integer"); + + b.Property("MinChannelRange") + .HasColumnType("integer"); + + b.Property("MovementPoints") + .HasColumnType("integer"); + + b.Property("MovementType") + .HasColumnType("text"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text"); + + b.Property("OtherCostsJson") + .HasColumnType("jsonb") + .HasColumnName("other_costs"); + + b.Property("PreviousTierId") + .HasColumnType("uuid"); + + b.Property("Rarity") + .IsRequired() + .HasColumnType("text"); + + b.Property("RequiresLos") + .HasColumnType("boolean"); + + b.Property("RetiredAt") + .HasColumnType("timestamp with time zone"); + + b.Property("SetId") + .HasColumnType("uuid"); + + b.Property("SpCost") + .HasColumnType("integer"); + + b.Property("StCost") + .HasColumnType("integer"); + + b.Property("TerramorphaMode") + .HasColumnType("text"); + + b.Property("Tier") + .HasColumnType("integer"); + + b.Property("UpdatedAt") + .HasColumnType("timestamp with time zone"); + + b.HasKey("Id"); + + b.HasIndex("Affinity"); + + b.HasIndex("CardType"); + + b.HasIndex("DefinitionVersion"); + + b.HasIndex("Name"); + + b.HasIndex("PreviousTierId"); + + b.HasIndex("Rarity"); + + b.HasIndex("SetId"); + + b.HasIndex("IsPublished", "SetId"); + + b.ToTable("card_definitions", "catalog"); + }); + + modelBuilder.Entity("SOR.Database.Entities.Catalog.CardSet", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("Code") + .IsRequired() + .HasColumnType("text"); + + b.Property("Description") + .HasColumnType("text"); + + b.Property("IsActive") + .HasColumnType("boolean"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text"); + + b.Property("ReleaseDate") + .HasColumnType("date"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("card_sets", "catalog"); + }); + + modelBuilder.Entity("SOR.Database.Entities.Catalog.CdnUploadRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("ContentType") + .HasColumnType("text"); + + b.Property("IsAiGenerated") + .HasColumnType("boolean"); + + b.Property("ObjectKey") + .IsRequired() + .HasColumnType("text"); + + b.Property("Prefix") + .IsRequired() + .HasColumnType("text"); + + b.Property("PublicUrl") + .IsRequired() + .HasColumnType("text"); + + b.Property("UploadedAt") + .HasColumnType("timestamp with time zone"); + + b.HasKey("Id"); + + b.HasIndex("IsAiGenerated"); + + b.HasIndex("ObjectKey") + .IsUnique(); + + b.HasIndex("Prefix"); + + b.ToTable("cdn_upload_records", "catalog"); + }); + + modelBuilder.Entity("SOR.Database.Entities.Catalog.GameAudioConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("Context") + .IsRequired() + .HasColumnType("text"); + + b.Property("IsActive") + .HasColumnType("boolean"); + + b.Property("TrackCdnUrl") + .IsRequired() + .HasColumnType("text"); + + b.Property("TrackName") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("Context"); + + b.HasIndex("IsActive"); + + b.ToTable("game_audio_configs", "catalog"); + }); + + modelBuilder.Entity("SOR.Database.Entities.Catalog.TileModelBinding", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("Affinity") + .IsRequired() + .HasColumnType("text"); + + b.Property("ModelCdnKey") + .IsRequired() + .HasColumnType("text"); + + b.Property("ModelPublicUrl") + .IsRequired() + .HasColumnType("text"); + + b.Property("Shape") + .IsRequired() + .HasColumnType("text"); + + b.Property("UpdatedAt") + .HasColumnType("timestamp with time zone"); + + b.HasKey("Id"); + + b.HasIndex("Affinity", "Shape") + .IsUnique(); + + b.ToTable("tile_model_bindings", "catalog"); + }); + + modelBuilder.Entity("SOR.Database.Entities.Catalog.CardAnimationBinding", b => + { + b.HasOne("SOR.Database.Entities.Catalog.CardDefinition", "CardDefinition") + .WithMany("AnimationBindings") + .HasForeignKey("CardDefinitionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CardDefinition"); + }); + + modelBuilder.Entity("SOR.Database.Entities.Catalog.CardAsset", b => + { + b.HasOne("SOR.Database.Entities.Catalog.CardDefinition", "CardDefinition") + .WithMany("Assets") + .HasForeignKey("CardDefinitionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CardDefinition"); + }); + + modelBuilder.Entity("SOR.Database.Entities.Catalog.CardDefinition", b => + { + b.HasOne("SOR.Database.Entities.Catalog.CardDefinition", "PreviousTier") + .WithMany() + .HasForeignKey("PreviousTierId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("SOR.Database.Entities.Catalog.CardSet", "Set") + .WithMany("Cards") + .HasForeignKey("SetId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("PreviousTier"); + + b.Navigation("Set"); + }); + + modelBuilder.Entity("SOR.Database.Entities.Catalog.CardDefinition", b => + { + b.Navigation("AnimationBindings"); + + b.Navigation("Assets"); + }); + + modelBuilder.Entity("SOR.Database.Entities.Catalog.CardSet", b => + { + b.Navigation("Cards"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Server/src/SOR.Database/Migrations/Catalog/20260314122217_AddGameAudioConfig.cs b/Server/src/SOR.Database/Migrations/Catalog/20260314122217_AddGameAudioConfig.cs new file mode 100644 index 0000000..cc8c30a --- /dev/null +++ b/Server/src/SOR.Database/Migrations/Catalog/20260314122217_AddGameAudioConfig.cs @@ -0,0 +1,22 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace SOR.Database.Migrations.Catalog +{ + /// + public partial class AddGameAudioConfig : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + + } + } +} diff --git a/Server/src/SOR.Database/Migrations/Catalog/CatalogDbContextModelSnapshot.cs b/Server/src/SOR.Database/Migrations/Catalog/CatalogDbContextModelSnapshot.cs index 3115a17..91e42da 100644 --- a/Server/src/SOR.Database/Migrations/Catalog/CatalogDbContextModelSnapshot.cs +++ b/Server/src/SOR.Database/Migrations/Catalog/CatalogDbContextModelSnapshot.cs @@ -23,36 +23,6 @@ namespace SOR.Database.Migrations.Catalog NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - modelBuilder.Entity("SOR.Database.Entities.Catalog.GameAudioConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("Context") - .IsRequired() - .HasColumnType("text"); - - b.Property("IsActive") - .HasColumnType("boolean"); - - b.Property("TrackCdnUrl") - .IsRequired() - .HasColumnType("text"); - - b.Property("TrackName") - .IsRequired() - .HasColumnType("text"); - - b.HasKey("Id"); - - b.HasIndex("Context"); - - b.HasIndex("IsActive"); - - b.ToTable("game_audio_configs", "catalog"); - }); - modelBuilder.Entity("SOR.Database.Entities.Catalog.CardAnimationBinding", b => { b.Property("Id") @@ -350,6 +320,36 @@ namespace SOR.Database.Migrations.Catalog b.ToTable("cdn_upload_records", "catalog"); }); + modelBuilder.Entity("SOR.Database.Entities.Catalog.GameAudioConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("Context") + .IsRequired() + .HasColumnType("text"); + + b.Property("IsActive") + .HasColumnType("boolean"); + + b.Property("TrackCdnUrl") + .IsRequired() + .HasColumnType("text"); + + b.Property("TrackName") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("Context"); + + b.HasIndex("IsActive"); + + b.ToTable("game_audio_configs", "catalog"); + }); + modelBuilder.Entity("SOR.Database.Entities.Catalog.TileModelBinding", b => { b.Property("Id") @@ -360,10 +360,6 @@ namespace SOR.Database.Migrations.Catalog .IsRequired() .HasColumnType("text"); - b.Property("Shape") - .IsRequired() - .HasColumnType("text"); - b.Property("ModelCdnKey") .IsRequired() .HasColumnType("text"); @@ -372,6 +368,10 @@ namespace SOR.Database.Migrations.Catalog .IsRequired() .HasColumnType("text"); + b.Property("Shape") + .IsRequired() + .HasColumnType("text"); + b.Property("UpdatedAt") .HasColumnType("timestamp with time zone"); diff --git a/Server/src/SOR.Database/Migrations/Identity/20260314122128_AddLeaderboardHide.Designer.cs b/Server/src/SOR.Database/Migrations/Identity/20260314122128_AddLeaderboardHide.Designer.cs new file mode 100644 index 0000000..32db492 --- /dev/null +++ b/Server/src/SOR.Database/Migrations/Identity/20260314122128_AddLeaderboardHide.Designer.cs @@ -0,0 +1,413 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; +using SOR.Database.Contexts; + +#nullable disable + +namespace SOR.Database.Migrations.Identity +{ + [DbContext(typeof(SorIdentityDbContext))] + [Migration("20260314122128_AddLeaderboardHide")] + partial class AddLeaderboardHide + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasDefaultSchema("identity") + .HasAnnotation("ProductVersion", "8.0.0") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("text"); + + b.Property("Name") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("NormalizedName") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName") + .IsUnique() + .HasDatabaseName("RoleNameIndex"); + + b.ToTable("roles", "identity"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("ClaimType") + .HasColumnType("text"); + + b.Property("ClaimValue") + .HasColumnType("text"); + + b.Property("RoleId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("role_claims", "identity"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("ClaimType") + .HasColumnType("text"); + + b.Property("ClaimValue") + .HasColumnType("text"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("account_claims", "identity"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.Property("LoginProvider") + .HasColumnType("text"); + + b.Property("ProviderKey") + .HasColumnType("text"); + + b.Property("ProviderDisplayName") + .HasColumnType("text"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.HasKey("LoginProvider", "ProviderKey"); + + b.HasIndex("UserId"); + + b.ToTable("external_logins", "identity"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("RoleId") + .HasColumnType("uuid"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId"); + + b.ToTable("account_roles", "identity"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("LoginProvider") + .HasColumnType("text"); + + b.Property("Name") + .HasColumnType("text"); + + b.Property("Value") + .HasColumnType("text"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("account_tokens", "identity"); + }); + + modelBuilder.Entity("SOR.Database.Entities.Identity.Account", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("AccessFailedCount") + .HasColumnType("integer"); + + b.Property("AvatarCdnUrl") + .HasColumnType("text"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("text"); + + b.Property("CreatedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("DisplayName") + .HasColumnType("text"); + + b.Property("Email") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("EmailConfirmed") + .HasColumnType("boolean"); + + b.Property("IsHiddenFromLeaderboard") + .HasColumnType("boolean"); + + b.Property("LastLoginAt") + .HasColumnType("timestamp with time zone"); + + b.Property("LockoutEnabled") + .HasColumnType("boolean"); + + b.Property("LockoutEnd") + .HasColumnType("timestamp with time zone"); + + b.Property("NormalizedEmail") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("NormalizedUserName") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("OriginPoints") + .HasColumnType("integer"); + + b.Property("PasswordHash") + .HasColumnType("text"); + + b.Property("PhoneNumber") + .HasColumnType("text"); + + b.Property("PhoneNumberConfirmed") + .HasColumnType("boolean"); + + b.Property("RankScore") + .HasColumnType("integer"); + + b.Property("SecurityStamp") + .HasColumnType("text"); + + b.Property("StarterDeckSelectedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("TwoFactorEnabled") + .HasColumnType("boolean"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.HasKey("Id"); + + b.HasIndex("DisplayName"); + + b.HasIndex("NormalizedEmail") + .HasDatabaseName("EmailIndex"); + + b.HasIndex("NormalizedUserName") + .IsUnique() + .HasDatabaseName("UserNameIndex"); + + b.ToTable("accounts", "identity"); + }); + + modelBuilder.Entity("SOR.Database.Entities.Identity.AccountProperty", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("AccountId") + .HasColumnType("uuid"); + + b.Property("CreatedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("Key") + .IsRequired() + .HasColumnType("text"); + + b.Property("UpdatedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("Value") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("AccountId"); + + b.HasIndex("AccountId", "Key") + .IsUnique(); + + b.ToTable("account_properties", "identity"); + }); + + modelBuilder.Entity("SOR.Database.Entities.Identity.AccountSession", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("AccountId") + .HasColumnType("uuid"); + + b.Property("CreatedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("DeviceId") + .HasColumnType("text"); + + b.Property("ExpiresAt") + .HasColumnType("timestamp with time zone"); + + b.Property("IpAddress") + .HasColumnType("text"); + + b.Property("RevokedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("TokenHash") + .IsRequired() + .HasColumnType("text"); + + b.Property("UserAgent") + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("TokenHash") + .IsUnique(); + + b.HasIndex("AccountId", "ExpiresAt"); + + b.ToTable("account_sessions", "identity"); + }); + + modelBuilder.Entity("SOR.Database.Entities.Identity.ClientRelease", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("DownloadUrl") + .HasColumnType("text"); + + b.Property("IsActive") + .HasColumnType("boolean"); + + b.Property("IsRequired") + .HasColumnType("boolean"); + + b.Property("Platform") + .IsRequired() + .HasColumnType("text"); + + b.Property("ReleaseNotes") + .HasColumnType("text"); + + b.Property("ReleasedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("Version") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("Platform", "IsActive", "ReleasedAt"); + + b.ToTable("client_releases", "identity"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.HasOne("SOR.Database.Entities.Identity.Account", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.HasOne("SOR.Database.Entities.Identity.Account", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SOR.Database.Entities.Identity.Account", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.HasOne("SOR.Database.Entities.Identity.Account", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Server/src/SOR.Database/Migrations/Identity/20260313000001_AddLeaderboardHide.cs b/Server/src/SOR.Database/Migrations/Identity/20260314122128_AddLeaderboardHide.cs similarity index 94% rename from Server/src/SOR.Database/Migrations/Identity/20260313000001_AddLeaderboardHide.cs rename to Server/src/SOR.Database/Migrations/Identity/20260314122128_AddLeaderboardHide.cs index 37b9933..a4ffc51 100644 --- a/Server/src/SOR.Database/Migrations/Identity/20260313000001_AddLeaderboardHide.cs +++ b/Server/src/SOR.Database/Migrations/Identity/20260314122128_AddLeaderboardHide.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable