fixed crash when deleting Raids

removed Raid from Reminders and DiscordMessages
This commit is contained in:
Sarah Faey 2022-11-29 23:59:28 +01:00
parent 5d429ff90f
commit 893ec1f16d
11 changed files with 825 additions and 47 deletions

View file

@ -131,7 +131,7 @@ namespace Lieb.Migrations
b.Property<ulong>("DiscordMessageId")
.HasColumnType("INTEGER");
b.Property<int>("RaidId")
b.Property<int?>("RaidId")
.HasColumnType("INTEGER");
b.Property<int?>("RaidTemplateId")
@ -257,7 +257,7 @@ namespace Lieb.Migrations
.HasMaxLength(1000)
.HasColumnType("TEXT");
b.Property<int>("RaidId")
b.Property<int?>("RaidId")
.HasColumnType("INTEGER");
b.Property<int?>("RaidTemplateId")
@ -533,17 +533,13 @@ namespace Lieb.Migrations
modelBuilder.Entity("Lieb.Models.GuildWars2.Raid.DiscordRaidMessage", b =>
{
b.HasOne("Lieb.Models.GuildWars2.Raid.Raid", "Raid")
b.HasOne("Lieb.Models.GuildWars2.Raid.Raid", null)
.WithMany("DiscordRaidMessages")
.HasForeignKey("RaidId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
.HasForeignKey("RaidId");
b.HasOne("Lieb.Models.GuildWars2.Raid.RaidTemplate", null)
.WithMany("DiscordRaidMessages")
.HasForeignKey("RaidTemplateId");
b.Navigation("Raid");
});
modelBuilder.Entity("Lieb.Models.GuildWars2.Raid.RaidLog", b =>
@ -571,17 +567,13 @@ namespace Lieb.Migrations
modelBuilder.Entity("Lieb.Models.GuildWars2.Raid.RaidReminder", b =>
{
b.HasOne("Lieb.Models.GuildWars2.Raid.Raid", "Raid")
b.HasOne("Lieb.Models.GuildWars2.Raid.Raid", null)
.WithMany("Reminders")
.HasForeignKey("RaidId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
.HasForeignKey("RaidId");
b.HasOne("Lieb.Models.GuildWars2.Raid.RaidTemplate", null)
.WithMany("Reminders")
.HasForeignKey("RaidTemplateId");
b.Navigation("Raid");
});
modelBuilder.Entity("Lieb.Models.GuildWars2.Raid.RaidRole", b =>