a fork of iceshrimp.net but a tweaked frontend to my personal liking. waow
fediverse social-media social iceshrimp fedi
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

[backend/database] Fix notification report delete behavior

+50 -1
+44
Iceshrimp.Backend/Core/Database/Migrations/20251117122639_FixNotificationReportDeleteBehavior.cs
··· 1 + using Microsoft.EntityFrameworkCore.Migrations; 2 + using Microsoft.EntityFrameworkCore.Infrastructure; 3 + 4 + #nullable disable 5 + 6 + namespace Iceshrimp.Backend.Core.Database.Migrations 7 + { 8 + /// <inheritdoc /> 9 + [DbContext(typeof(DatabaseContext))] 10 + [Migration("20251117122639_FixNotificationReportDeleteBehavior")] 11 + public partial class FixNotificationReportDeleteBehavior : Migration 12 + { 13 + /// <inheritdoc /> 14 + protected override void Up(MigrationBuilder migrationBuilder) 15 + { 16 + migrationBuilder.DropForeignKey( 17 + name: "FK_notification_report_reportId", 18 + table: "notification"); 19 + 20 + migrationBuilder.AddForeignKey( 21 + name: "FK_notification_report_reportId", 22 + table: "notification", 23 + column: "reportId", 24 + principalTable: "report", 25 + principalColumn: "id", 26 + onDelete: ReferentialAction.Cascade); 27 + } 28 + 29 + /// <inheritdoc /> 30 + protected override void Down(MigrationBuilder migrationBuilder) 31 + { 32 + migrationBuilder.DropForeignKey( 33 + name: "FK_notification_report_reportId", 34 + table: "notification"); 35 + 36 + migrationBuilder.AddForeignKey( 37 + name: "FK_notification_report_reportId", 38 + table: "notification", 39 + column: "reportId", 40 + principalTable: "report", 41 + principalColumn: "id"); 42 + } 43 + } 44 + }
+2 -1
Iceshrimp.Backend/Core/Database/Migrations/DatabaseContextModelSnapshot.cs
··· 5682 5682 5683 5683 b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Report", "Report") 5684 5684 .WithMany() 5685 - .HasForeignKey("ReportId"); 5685 + .HasForeignKey("ReportId") 5686 + .OnDelete(DeleteBehavior.Cascade); 5686 5687 5687 5688 b.HasOne("Iceshrimp.Backend.Core.Database.Tables.UserGroupInvitation", "UserGroupInvitation") 5688 5689 .WithMany("Notifications")
+4
Iceshrimp.Backend/Core/Database/Tables/Notification.cs
··· 172 172 entity.HasOne(d => d.UserGroupInvitation) 173 173 .WithMany(p => p.Notifications) 174 174 .OnDelete(DeleteBehavior.Cascade); 175 + 176 + entity.HasOne(d => d.Report) 177 + .WithMany() 178 + .OnDelete(DeleteBehavior.Cascade); 175 179 } 176 180 } 177 181 }