แก้ กก
This commit is contained in:
parent
c724246081
commit
a31447c278
5 changed files with 18536 additions and 53 deletions
|
|
@ -0,0 +1,105 @@
|
|||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BMA.EHR.Infrastructure.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class updatetableplacementAddposition : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_PlacementProfiles_PositionLevels_PositionLevelId",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_PlacementProfiles_PositionTypes_PositionTypeId",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_PlacementProfiles_PositionLevelId",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_PlacementProfiles_PositionTypeId",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PositionLevelId",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PositionTypeId",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "PositionLevel",
|
||||
table: "PlacementProfiles",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ระดับ")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "PositionType",
|
||||
table: "PlacementProfiles",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ประเภทตำแหน่ง")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PositionLevel",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PositionType",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "PositionLevelId",
|
||||
table: "PlacementProfiles",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "PositionTypeId",
|
||||
table: "PlacementProfiles",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PlacementProfiles_PositionLevelId",
|
||||
table: "PlacementProfiles",
|
||||
column: "PositionLevelId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PlacementProfiles_PositionTypeId",
|
||||
table: "PlacementProfiles",
|
||||
column: "PositionTypeId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PlacementProfiles_PositionLevels_PositionLevelId",
|
||||
table: "PlacementProfiles",
|
||||
column: "PositionLevelId",
|
||||
principalTable: "PositionLevels",
|
||||
principalColumn: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PlacementProfiles_PositionTypes_PositionTypeId",
|
||||
table: "PlacementProfiles",
|
||||
column: "PositionTypeId",
|
||||
principalTable: "PositionTypes",
|
||||
principalColumn: "Id");
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue