64 lines
2.6 KiB
C#
64 lines
2.6 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
namespace tb320eva.Migrations
|
|
{
|
|
public partial class theGroup : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: "eva_evaluation_group",
|
|
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),
|
|
code = table.Column<string>(maxLength: 255, nullable: true),
|
|
thegroup = table.Column<string>(maxLength: 255, nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_eva_evaluation_group", x => x.id);
|
|
});
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "eva_evaluation_group_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),
|
|
evaluation_group_id = table.Column<Guid>(nullable: true),
|
|
employee_id = table.Column<int>(nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_eva_evaluation_group_detail", x => x.id);
|
|
table.ForeignKey(
|
|
name: "FK_eva_evaluation_group_detail_eva_evaluation_group_evaluation~",
|
|
column: x => x.evaluation_group_id,
|
|
principalTable: "eva_evaluation_group",
|
|
principalColumn: "id",
|
|
onDelete: ReferentialAction.Restrict);
|
|
});
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_eva_evaluation_group_detail_evaluation_group_id",
|
|
table: "eva_evaluation_group_detail",
|
|
column: "evaluation_group_id");
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "eva_evaluation_group_detail");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "eva_evaluation_group");
|
|
}
|
|
}
|
|
}
|