[backend/database] Remove remote user reply notifications
This commit is contained in:
parent
14f078d145
commit
238b441560
1 changed files with 27 additions and 0 deletions
|
@ -0,0 +1,27 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Iceshrimp.Backend.Core.Database.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
[DbContext(typeof(DatabaseContext))]
|
||||
[Migration("20240914004319_RemoveRemoteReplyNotifications")]
|
||||
public partial class RemoveRemoteReplyNotifications : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.Sql("""
|
||||
DELETE FROM "notification" WHERE "notifieeId" NOT IN (SELECT "id" FROM "user" WHERE "host" IS NULL);
|
||||
""");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue