44 lines
1.6 KiB
C#
44 lines
1.6 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
namespace tb320eva.Migrations
|
|
{
|
|
public partial class UpdateEvaDetail02 : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<decimal>(
|
|
name: "work_period",
|
|
table: "eva_create_evaluation_detail",
|
|
nullable: true);
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_eva_create_evaluation_detail_create_evaluation_id",
|
|
table: "eva_create_evaluation_detail",
|
|
column: "create_evaluation_id");
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_eva_create_evaluation_detail_eva_create_evaluation_create_e~",
|
|
table: "eva_create_evaluation_detail",
|
|
column: "create_evaluation_id",
|
|
principalTable: "eva_create_evaluation",
|
|
principalColumn: "id",
|
|
onDelete: ReferentialAction.Restrict);
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_eva_create_evaluation_detail_eva_create_evaluation_create_e~",
|
|
table: "eva_create_evaluation_detail");
|
|
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_eva_create_evaluation_detail_create_evaluation_id",
|
|
table: "eva_create_evaluation_detail");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "work_period",
|
|
table: "eva_create_evaluation_detail");
|
|
}
|
|
}
|
|
}
|