Files
hrm_eva/Migrations/25630109082906_FirstInitial.cs
Nakorn Rientrakrunchai 8b98125e49 First Initial
2020-02-20 15:02:39 +07:00

68 lines
2.8 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace tb320eva.Migrations
{
public partial class FirstInitial : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "eva_performance_plan",
columns: table => new
{
id = table.Column<Guid>(nullable: false),
created = table.Column<DateTime>(nullable: false),
updated = table.Column<DateTime>(nullable: false),
isActive = table.Column<bool>(nullable: false),
fiscal_year = table.Column<int>(nullable: true),
theTime = table.Column<int>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_eva_performance_plan", x => x.id);
});
migrationBuilder.CreateTable(
name: "eva_performance_plan_detail",
columns: table => new
{
id = table.Column<Guid>(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),
list_no = table.Column<int>(nullable: true),
step = table.Column<string>(maxLength: 1000, nullable: true),
start_date = table.Column<DateTime>(nullable: true),
end_date = table.Column<DateTime>(nullable: true),
remark = table.Column<string>(maxLength: 1000, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_eva_performance_plan_detail", x => x.id);
table.ForeignKey(
name: "FK_eva_performance_plan_detail_eva_performance_plan_performanc~",
column: x => x.performance_plan_id,
principalTable: "eva_performance_plan",
principalColumn: "id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateIndex(
name: "IX_eva_performance_plan_detail_performance_plan_id",
table: "eva_performance_plan_detail",
column: "performance_plan_id");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "eva_performance_plan_detail");
migrationBuilder.DropTable(
name: "eva_performance_plan");
}
}
}