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");
        }
    }
}
