แก้ออกคำสั่ง
This commit is contained in:
parent
ee2aa136b9
commit
6c09c68c5c
33 changed files with 18908 additions and 626 deletions
|
|
@ -0,0 +1,75 @@
|
|||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BMA.EHR.Infrastructure.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class updatetableRetirementOtheraddleavedate : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ProfileLeaves_Profiles_ProfileId",
|
||||
table: "ProfileLeaves");
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "LeaveDate",
|
||||
table: "RetirementOthers",
|
||||
type: "datetime(6)",
|
||||
nullable: true,
|
||||
comment: "วันที่ออกราชการเมื่อ");
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "ProfileId",
|
||||
table: "ProfileLeaves",
|
||||
type: "char(36)",
|
||||
nullable: false,
|
||||
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
||||
collation: "ascii_general_ci",
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "char(36)",
|
||||
oldNullable: true)
|
||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ProfileLeaves_Profiles_ProfileId",
|
||||
table: "ProfileLeaves",
|
||||
column: "ProfileId",
|
||||
principalTable: "Profiles",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ProfileLeaves_Profiles_ProfileId",
|
||||
table: "ProfileLeaves");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "LeaveDate",
|
||||
table: "RetirementOthers");
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "ProfileId",
|
||||
table: "ProfileLeaves",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci",
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "char(36)")
|
||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ProfileLeaves_Profiles_ProfileId",
|
||||
table: "ProfileLeaves",
|
||||
column: "ProfileId",
|
||||
principalTable: "Profiles",
|
||||
principalColumn: "Id");
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue