49 lines
1.5 KiB
C#
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");
|
|
}
|
|
}
|
|
}
|