hrms-api-backend/BMA.EHR.Infrastructure/Migrations/LeaveDb/20231123082309_change field from kk_id to profile id.cs
Suphonchai Phoonsawat 2bf43a52b5 change round
2023-11-23 15:48:09 +07:00

45 lines
1.5 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BMA.EHR.Infrastructure.Migrations.LeaveDb
{
/// <inheritdoc />
public partial class changefieldfromkk_idtoprofileid : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "KeycloakUserId",
table: "UserDutyTimes");
migrationBuilder.AddColumn<Guid>(
name: "ProfileId",
table: "UserDutyTimes",
type: "char(36)",
nullable: false,
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
comment: "รหัส Profile ในระบบทะเบียนประวัติ",
collation: "ascii_general_ci");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "ProfileId",
table: "UserDutyTimes");
migrationBuilder.AddColumn<Guid>(
name: "KeycloakUserId",
table: "UserDutyTimes",
type: "char(36)",
nullable: false,
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
comment: "รหัส User ของ Keycloak",
collation: "ascii_general_ci");
}
}
}