Files
CouchLog/CouchLog/Migrations/20251201222218_RemoveUserFromStatus.cs
2025-12-08 22:08:43 +01:00

49 lines
1.5 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace CouchLog.Migrations
{
/// <inheritdoc />
public partial class RemoveUserFromStatus : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_UserWatchStatuses_AspNetUsers_ApplicationUserId",
table: "UserWatchStatuses");
migrationBuilder.DropIndex(
name: "IX_UserWatchStatuses_ApplicationUserId",
table: "UserWatchStatuses");
migrationBuilder.DropColumn(
name: "ApplicationUserId",
table: "UserWatchStatuses");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "ApplicationUserId",
table: "UserWatchStatuses",
type: "TEXT",
nullable: true);
migrationBuilder.CreateIndex(
name: "IX_UserWatchStatuses_ApplicationUserId",
table: "UserWatchStatuses",
column: "ApplicationUserId");
migrationBuilder.AddForeignKey(
name: "FK_UserWatchStatuses_AspNetUsers_ApplicationUserId",
table: "UserWatchStatuses",
column: "ApplicationUserId",
principalTable: "AspNetUsers",
principalColumn: "Id");
}
}
}