67 lines
2.7 KiB
C#
67 lines
2.7 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
namespace tb320eva.Migrations
|
|
{
|
|
public partial class evaluation_create : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: "eva_create_evaluation",
|
|
columns: table => new
|
|
{
|
|
id = table.Column<int>(nullable: false),
|
|
created = table.Column<DateTime>(nullable: false),
|
|
updated = table.Column<DateTime>(nullable: false),
|
|
isActive = table.Column<bool>(nullable: false),
|
|
performance_plan_id = table.Column<Guid>(nullable: true),
|
|
employee_id = table.Column<int>(nullable: true),
|
|
score1 = table.Column<decimal>(nullable: true),
|
|
score2 = table.Column<decimal>(nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_eva_create_evaluation", x => x.id);
|
|
table.ForeignKey(
|
|
name: "FK_eva_create_evaluation_eva_performance_plan_performance_plan~",
|
|
column: x => x.performance_plan_id,
|
|
principalTable: "eva_performance_plan",
|
|
principalColumn: "id",
|
|
onDelete: ReferentialAction.Restrict);
|
|
});
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "eva_create_evaluation_detail",
|
|
columns: table => new
|
|
{
|
|
id = table.Column<int>(nullable: false),
|
|
created = table.Column<DateTime>(nullable: false),
|
|
updated = table.Column<DateTime>(nullable: false),
|
|
isActive = table.Column<bool>(nullable: false),
|
|
create_evaluation_id = table.Column<int>(nullable: true),
|
|
employee_id = table.Column<int>(nullable: true),
|
|
chief = table.Column<int>(nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_eva_create_evaluation_detail", x => x.id);
|
|
});
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_eva_create_evaluation_performance_plan_id",
|
|
table: "eva_create_evaluation",
|
|
column: "performance_plan_id");
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "eva_create_evaluation");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "eva_create_evaluation_detail");
|
|
}
|
|
}
|
|
}
|