feat(viewer): migration for mypage bg selection
Adds AddViewerMyPageBgSelection migration: two int scalars on Viewers (MyPageBgId, MyPageBgSelectType default 0) and ViewerMyPageBgRotation owned table with composite PK (ViewerId, Slot), FK cascade to Viewers. Also adds ToTable(ViewerMyPageBgRotation) to OwnsMany config so EF uses the correct table name instead of defaulting to the entity class. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2600,6 +2600,12 @@ namespace SVSim.Database.Migrations
|
||||
b.Property<DateTime>("LastLogin")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<int>("MyPageBgId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("MyPageBgSelectType")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<long>("ShortUdid")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint")
|
||||
@@ -3723,6 +3729,25 @@ namespace SVSim.Database.Migrations
|
||||
|
||||
modelBuilder.Entity("SVSim.Database.Models.Viewer", b =>
|
||||
{
|
||||
b.OwnsMany("SVSim.Database.Models.MyPageBgRotationEntry", "MyPageBgRotation", b1 =>
|
||||
{
|
||||
b1.Property<long>("ViewerId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b1.Property<int>("Slot")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b1.Property<int>("BgId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b1.HasKey("ViewerId", "Slot");
|
||||
|
||||
b1.ToTable("ViewerMyPageBgRotation", (string)null);
|
||||
|
||||
b1.WithOwner()
|
||||
.HasForeignKey("ViewerId");
|
||||
});
|
||||
|
||||
b.OwnsMany("SVSim.Database.Models.OwnedCardEntry", "Cards", b1 =>
|
||||
{
|
||||
b1.Property<long>("ViewerId")
|
||||
@@ -4170,6 +4195,8 @@ namespace SVSim.Database.Migrations
|
||||
b.Navigation("MissionData")
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("MyPageBgRotation");
|
||||
|
||||
b.Navigation("PackOpenCounts");
|
||||
|
||||
b.Navigation("SocialAccountConnections");
|
||||
|
||||
Reference in New Issue
Block a user