48 lines
1.9 KiB
C#
48 lines
1.9 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
namespace tb320eva.Migrations
|
|
{
|
|
public partial class AddLevelScore : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: "eva_level_score_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),
|
|
level_score_id = table.Column<Guid>(nullable: false),
|
|
min_value = table.Column<decimal>(nullable: true),
|
|
max_value = table.Column<decimal>(nullable: true),
|
|
min_percentage = table.Column<decimal>(nullable: true),
|
|
max_percentage = table.Column<decimal>(nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_eva_level_score_detail", x => x.id);
|
|
table.ForeignKey(
|
|
name: "FK_eva_level_score_detail_eva_level_score_level_score_id",
|
|
column: x => x.level_score_id,
|
|
principalTable: "eva_level_score",
|
|
principalColumn: "id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
});
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_eva_level_score_detail_level_score_id",
|
|
table: "eva_level_score_detail",
|
|
column: "level_score_id");
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "eva_level_score_detail");
|
|
}
|
|
}
|
|
}
|