Iceshrimp.NET/Iceshrimp.Backend/Core/Database/Migrations/20240307203857_AllowMultipleReactions.cs
2024-03-09 01:16:57 +01:00

38 lines
1.2 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Iceshrimp.Backend.Core.Database.Migrations
{
/// <inheritdoc />
public partial class AllowMultipleReactions : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropIndex(
name: "IX_note_reaction_userId_noteId",
table: "note_reaction");
migrationBuilder.CreateIndex(
name: "IX_note_reaction_userId_noteId_reaction",
table: "note_reaction",
columns: new[] { "userId", "noteId", "reaction" },
unique: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropIndex(
name: "IX_note_reaction_userId_noteId_reaction",
table: "note_reaction");
migrationBuilder.CreateIndex(
name: "IX_note_reaction_userId_noteId",
table: "note_reaction",
columns: new[] { "userId", "noteId" },
unique: true);
}
}
}