ปรับปรุงส่วน ตารางกำหนดช่วงร้อยละที่ได้เลื่อน
This commit is contained in:
1165
Migrations/20211030034925_AddLevelScoreForGroup2.Designer.cs
generated
Normal file
1165
Migrations/20211030034925_AddLevelScoreForGroup2.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
153
Migrations/20211030034925_AddLevelScoreForGroup2.cs
Normal file
153
Migrations/20211030034925_AddLevelScoreForGroup2.cs
Normal file
@@ -0,0 +1,153 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace tb320eva.Migrations
|
||||
{
|
||||
public partial class AddLevelScoreForGroup2 : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_eva_level_score_detail_eva_level_score_level_score_id",
|
||||
table: "eva_level_score_detail");
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "level_score_id",
|
||||
table: "eva_level_score_detail",
|
||||
nullable: true,
|
||||
oldClrType: typeof(Guid));
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "group_guid",
|
||||
table: "eva_level_score_detail",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "behavior",
|
||||
table: "eva_evaluation_behavior",
|
||||
maxLength: 16000,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldMaxLength: 1000,
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "achievement",
|
||||
table: "eva_evaluation_achievement",
|
||||
maxLength: 16000,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldMaxLength: 8000,
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "properties",
|
||||
table: "activity_log_eva",
|
||||
maxLength: 32000,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldMaxLength: 8000,
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "description",
|
||||
table: "activity_log_eva",
|
||||
maxLength: 32000,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldMaxLength: 4000,
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_eva_level_score_detail_group_guid",
|
||||
table: "eva_level_score_detail",
|
||||
column: "group_guid");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_eva_level_score_detail_eva_evaluation_group_group_guid",
|
||||
table: "eva_level_score_detail",
|
||||
column: "group_guid",
|
||||
principalTable: "eva_evaluation_group",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_eva_level_score_detail_eva_level_score_level_score_id",
|
||||
table: "eva_level_score_detail",
|
||||
column: "level_score_id",
|
||||
principalTable: "eva_level_score",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_eva_level_score_detail_eva_evaluation_group_group_guid",
|
||||
table: "eva_level_score_detail");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_eva_level_score_detail_eva_level_score_level_score_id",
|
||||
table: "eva_level_score_detail");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_eva_level_score_detail_group_guid",
|
||||
table: "eva_level_score_detail");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "group_guid",
|
||||
table: "eva_level_score_detail");
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "level_score_id",
|
||||
table: "eva_level_score_detail",
|
||||
nullable: false,
|
||||
oldClrType: typeof(Guid),
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "behavior",
|
||||
table: "eva_evaluation_behavior",
|
||||
maxLength: 1000,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldMaxLength: 16000,
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "achievement",
|
||||
table: "eva_evaluation_achievement",
|
||||
maxLength: 8000,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldMaxLength: 16000,
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "properties",
|
||||
table: "activity_log_eva",
|
||||
maxLength: 8000,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldMaxLength: 32000,
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "description",
|
||||
table: "activity_log_eva",
|
||||
maxLength: 4000,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldMaxLength: 32000,
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_eva_level_score_detail_eva_level_score_level_score_id",
|
||||
table: "eva_level_score_detail",
|
||||
column: "level_score_id",
|
||||
principalTable: "eva_level_score",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -729,9 +729,11 @@ namespace tb320eva.Migrations
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<Guid?>("group_guid");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<Guid>("level_score_id");
|
||||
b.Property<Guid?>("level_score_id");
|
||||
|
||||
b.Property<decimal?>("max_percentage");
|
||||
|
||||
@@ -745,6 +747,8 @@ namespace tb320eva.Migrations
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("group_guid");
|
||||
|
||||
b.HasIndex("level_score_id");
|
||||
|
||||
b.ToTable("eva_level_score_detail");
|
||||
@@ -1106,10 +1110,13 @@ namespace tb320eva.Migrations
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_level_score_detailEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_evaluation_groupEntity", "eva_evaluation_group_group_guid")
|
||||
.WithMany()
|
||||
.HasForeignKey("group_guid");
|
||||
|
||||
b.HasOne("TodoAPI2.Models.eva_level_scoreEntity", "eva_level_score_level_score_id")
|
||||
.WithMany()
|
||||
.HasForeignKey("level_score_id")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
.HasForeignKey("level_score_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_limit_frame_employeeEntity", b =>
|
||||
|
||||
Reference in New Issue
Block a user