using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace MTWorkHR.Infrastructure.Migrations
{
///
public partial class userHistory : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn(
name: "UserTaskId",
table: "UserTaskHistories",
type: "bigint",
nullable: true);
migrationBuilder.CreateIndex(
name: "IX_UserTaskHistories_UserTaskId",
table: "UserTaskHistories",
column: "UserTaskId");
migrationBuilder.AddForeignKey(
name: "FK_UserTaskHistories_UserTasks_UserTaskId",
table: "UserTaskHistories",
column: "UserTaskId",
principalTable: "UserTasks",
principalColumn: "Id");
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_UserTaskHistories_UserTasks_UserTaskId",
table: "UserTaskHistories");
migrationBuilder.DropIndex(
name: "IX_UserTaskHistories_UserTaskId",
table: "UserTaskHistories");
migrationBuilder.DropColumn(
name: "UserTaskId",
table: "UserTaskHistories");
}
}
}