From 5b143c1ef3f7b897beff80eb467d6020a7507526 Mon Sep 17 00:00:00 2001 From: Timothy Schenk Date: Wed, 8 Nov 2023 15:39:25 +0100 Subject: [PATCH] chore: add migration for inventory data --- .../WonderkingContextModelSnapshot.cs | 148 +----------------- Server/Server.csproj | 4 + 2 files changed, 6 insertions(+), 146 deletions(-) diff --git a/Server/DB/Migrations/WonderkingContextModelSnapshot.cs b/Server/DB/Migrations/WonderkingContextModelSnapshot.cs index a1f3412..ab1f034 100644 --- a/Server/DB/Migrations/WonderkingContextModelSnapshot.cs +++ b/Server/DB/Migrations/WonderkingContextModelSnapshot.cs @@ -63,12 +63,6 @@ namespace Server.DB.Migrations b.Property("Gender") .HasColumnType("smallint"); - b.Property("GuildId") - .HasColumnType("uuid"); - - b.Property("Health") - .HasColumnType("integer"); - b.Property("LastXCoordinate") .HasColumnType("smallint"); @@ -78,9 +72,6 @@ namespace Server.DB.Migrations b.Property("Level") .HasColumnType("smallint"); - b.Property("Mana") - .HasColumnType("integer"); - b.Property("MapId") .HasColumnType("integer"); @@ -97,52 +88,9 @@ namespace Server.DB.Migrations b.HasIndex("AccountId"); - b.HasIndex("GuildId"); - b.ToTable("Characters"); }); - modelBuilder.Entity("Server.DB.Documents.Guild", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("Name") - .HasColumnType("text"); - - b.Property("Notice") - .HasColumnType("text"); - - b.HasKey("Id"); - - b.ToTable("Guild"); - }); - - modelBuilder.Entity("Server.DB.Documents.GuildMember", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("CharacterId") - .HasColumnType("uuid"); - - b.Property("GuildId") - .HasColumnType("uuid"); - - b.Property("Rank") - .HasColumnType("smallint"); - - b.HasKey("Id"); - - b.HasIndex("CharacterId"); - - b.HasIndex("GuildId"); - - b.ToTable("GuildMember"); - }); - modelBuilder.Entity("Server.DB.Documents.InventoryItem", b => { b.Property("Id") @@ -164,8 +112,8 @@ namespace Server.DB.Migrations b.Property("Count") .HasColumnType("integer"); - b.Property("ItemId") - .HasColumnType("integer"); + b.Property("ItemId") + .HasColumnType("smallint"); b.Property("ItemType") .HasColumnType("smallint"); @@ -203,94 +151,7 @@ namespace Server.DB.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Server.DB.Documents.Guild", "Guild") - .WithMany() - .HasForeignKey("GuildId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.OwnsOne("Wonderking.Packets.Outgoing.BaseStats", "BaseStats", b1 => - { - b1.Property("CharacterId") - .HasColumnType("uuid"); - - b1.Property("Dexterity") - .HasColumnType("smallint"); - - b1.Property("Intelligence") - .HasColumnType("smallint"); - - b1.Property("Luck") - .HasColumnType("smallint"); - - b1.Property("Strength") - .HasColumnType("smallint"); - - b1.Property("Vitality") - .HasColumnType("smallint"); - - b1.Property("Wisdom") - .HasColumnType("smallint"); - - b1.HasKey("CharacterId"); - - b1.ToTable("Characters"); - - b1.WithOwner() - .HasForeignKey("CharacterId"); - }); - - b.OwnsOne("Wonderking.Packets.Outgoing.JobData", "JobData", b1 => - { - b1.Property("CharacterId") - .HasColumnType("uuid"); - - b1.Property("FirstJob") - .HasColumnType("smallint"); - - b1.Property("FourthJob") - .HasColumnType("smallint"); - - b1.Property("SecondJob") - .HasColumnType("smallint"); - - b1.Property("ThirdJob") - .HasColumnType("smallint"); - - b1.HasKey("CharacterId"); - - b1.ToTable("Characters"); - - b1.WithOwner() - .HasForeignKey("CharacterId"); - }); - b.Navigation("Account"); - - b.Navigation("BaseStats"); - - b.Navigation("Guild"); - - b.Navigation("JobData"); - }); - - modelBuilder.Entity("Server.DB.Documents.GuildMember", b => - { - b.HasOne("Server.DB.Documents.Character", "Character") - .WithMany() - .HasForeignKey("CharacterId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Server.DB.Documents.Guild", "Guild") - .WithMany("GuildMembers") - .HasForeignKey("GuildId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Character"); - - b.Navigation("Guild"); }); modelBuilder.Entity("Server.DB.Documents.InventoryItem", b => @@ -313,11 +174,6 @@ namespace Server.DB.Migrations { b.Navigation("InventoryItems"); }); - - modelBuilder.Entity("Server.DB.Documents.Guild", b => - { - b.Navigation("GuildMembers"); - }); #pragma warning restore 612, 618 } } diff --git a/Server/Server.csproj b/Server/Server.csproj index 0dfbb16..0cfbc67 100644 --- a/Server/Server.csproj +++ b/Server/Server.csproj @@ -66,6 +66,10 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive +