Files
Sharpbin/SharpbinV3.Server/Migrations/20260424090002_IndexInteractions.cs
whoswhip 63b77bece9 feat: comments & paste/comment reactions; renames/refactors
this is a LOT, i should've commited in stages but oh well, from what i can remember:
- paste interactions (reactions)
- comments
- comment interactions (reactions)
- rich text editor
- move all report apis into report controller
- rename size to sizeStored
- rename trueSize to originalSize
- fixed compression on paste compression
    - implemented compression threshold
- use longs instead of ints where possible in the entities
- improve record view + remove redundant check for existing view
2026-04-24 08:52:33 -04:00

75 lines
2.5 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace SharpbinV3.Server.Migrations
{
/// <inheritdoc />
public partial class IndexInteractions : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropIndex(
name: "IX_PasteInteractions_PasteID",
table: "PasteInteractions");
migrationBuilder.DropIndex(
name: "IX_CommentInteractions_CommentID",
table: "CommentInteractions");
migrationBuilder.CreateIndex(
name: "IX_PasteInteractions_PasteID_Type",
table: "PasteInteractions",
columns: new[] { "PasteID", "Type" });
migrationBuilder.CreateIndex(
name: "IX_PasteInteractions_PasteID_UserUUID",
table: "PasteInteractions",
columns: new[] { "PasteID", "UserUUID" },
unique: true);
migrationBuilder.CreateIndex(
name: "IX_CommentInteractions_CommentID_Type",
table: "CommentInteractions",
columns: new[] { "CommentID", "Type" });
migrationBuilder.CreateIndex(
name: "IX_CommentInteractions_CommentID_UserUUID",
table: "CommentInteractions",
columns: new[] { "CommentID", "UserUUID" },
unique: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropIndex(
name: "IX_PasteInteractions_PasteID_Type",
table: "PasteInteractions");
migrationBuilder.DropIndex(
name: "IX_PasteInteractions_PasteID_UserUUID",
table: "PasteInteractions");
migrationBuilder.DropIndex(
name: "IX_CommentInteractions_CommentID_Type",
table: "CommentInteractions");
migrationBuilder.DropIndex(
name: "IX_CommentInteractions_CommentID_UserUUID",
table: "CommentInteractions");
migrationBuilder.CreateIndex(
name: "IX_PasteInteractions_PasteID",
table: "PasteInteractions",
column: "PasteID");
migrationBuilder.CreateIndex(
name: "IX_CommentInteractions_CommentID",
table: "CommentInteractions",
column: "CommentID");
}
}
}