using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace BMA.EHR.Recurit.Exam.Service.Migrations
{
    /// <inheritdoc />
    public partial class updatetableCandidatefeildnull : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterColumn<string>(
                name: "Telephone",
                table: "Candidates",
                type: "varchar(20)",
                maxLength: 20,
                nullable: true,
                comment: "โทรศัพท์",
                oldClrType: typeof(string),
                oldType: "varchar(20)",
                oldMaxLength: 20,
                oldComment: "โทรศัพท์")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<string>(
                name: "RegistZipCode",
                table: "Candidates",
                type: "varchar(10)",
                maxLength: 10,
                nullable: true,
                comment: "รหัสไปรษณีย์ที่อยู่ตามทะเบียนบ้าน",
                oldClrType: typeof(string),
                oldType: "varchar(10)",
                oldMaxLength: 10,
                oldComment: "รหัสไปรษณีย์ที่อยู่ตามทะเบียนบ้าน")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<bool>(
                name: "RegistSame",
                table: "Candidates",
                type: "tinyint(1)",
                nullable: true,
                comment: "ที่อยู่ปัจจุบันเหมือนที่อยู่ตามทะเบียนบ้าน",
                oldClrType: typeof(bool),
                oldType: "tinyint(1)",
                oldComment: "ที่อยู่ปัจจุบันเหมือนที่อยู่ตามทะเบียนบ้าน");

            migrationBuilder.AlterColumn<string>(
                name: "RegistAddress",
                table: "Candidates",
                type: "longtext",
                nullable: true,
                comment: "ที่อยู่ตามทะเบียนบ้าน",
                oldClrType: typeof(string),
                oldType: "longtext",
                oldComment: "ที่อยู่ตามทะเบียนบ้าน")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<string>(
                name: "OccupationType",
                table: "Candidates",
                type: "longtext",
                nullable: true,
                comment: "ประเภทอาชีพที่ทำงานมาก่อน",
                oldClrType: typeof(string),
                oldType: "longtext",
                oldComment: "ประเภทอาชีพที่ทำงานมาก่อน")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<string>(
                name: "OccupationTelephone",
                table: "Candidates",
                type: "varchar(20)",
                maxLength: 20,
                nullable: true,
                comment: "โทรศัพท์ บริษัท",
                oldClrType: typeof(string),
                oldType: "varchar(20)",
                oldMaxLength: 20,
                oldComment: "โทรศัพท์ บริษัท")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<string>(
                name: "OccupationEmail",
                table: "Candidates",
                type: "varchar(200)",
                maxLength: 200,
                nullable: true,
                comment: "อีเมล บริษัท",
                oldClrType: typeof(string),
                oldType: "varchar(200)",
                oldMaxLength: 200,
                oldComment: "อีเมล บริษัท")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<string>(
                name: "OccupationDepartment",
                table: "Candidates",
                type: "longtext",
                nullable: true,
                comment: "กอง/ฝ่าย บริษัท",
                oldClrType: typeof(string),
                oldType: "longtext",
                oldComment: "กอง/ฝ่าย บริษัท")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<string>(
                name: "OccupationCompany",
                table: "Candidates",
                type: "longtext",
                nullable: true,
                comment: "สำนัก/บริษัท บริษัท",
                oldClrType: typeof(string),
                oldType: "longtext",
                oldComment: "สำนัก/บริษัท บริษัท")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<string>(
                name: "Nationality",
                table: "Candidates",
                type: "varchar(40)",
                maxLength: 40,
                nullable: true,
                comment: "สัญชาติ",
                oldClrType: typeof(string),
                oldType: "varchar(40)",
                oldMaxLength: 40,
                oldComment: "สัญชาติ")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<string>(
                name: "MotherLastName",
                table: "Candidates",
                type: "varchar(100)",
                maxLength: 100,
                nullable: true,
                comment: "นามสกุลมารดา",
                oldClrType: typeof(string),
                oldType: "varchar(100)",
                oldMaxLength: 100,
                oldComment: "นามสกุลมารดา")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<string>(
                name: "MotherFirstName",
                table: "Candidates",
                type: "varchar(100)",
                maxLength: 100,
                nullable: true,
                comment: "ชื่อจริงมารดา",
                oldClrType: typeof(string),
                oldType: "varchar(100)",
                oldMaxLength: 100,
                oldComment: "ชื่อจริงมารดา")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<string>(
                name: "MobilePhone",
                table: "Candidates",
                type: "varchar(20)",
                maxLength: 20,
                nullable: true,
                comment: "โทรศัพท์มือถือ",
                oldClrType: typeof(string),
                oldType: "varchar(20)",
                oldMaxLength: 20,
                oldComment: "โทรศัพท์มือถือ")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<string>(
                name: "MarryLastName",
                table: "Candidates",
                type: "varchar(100)",
                maxLength: 100,
                nullable: true,
                comment: "นามสกุลคู่สมรส",
                oldClrType: typeof(string),
                oldType: "varchar(100)",
                oldMaxLength: 100,
                oldComment: "นามสกุลคู่สมรส")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<string>(
                name: "MarryFirstName",
                table: "Candidates",
                type: "varchar(100)",
                maxLength: 100,
                nullable: true,
                comment: "ชื่อจริงคู่สมรส",
                oldClrType: typeof(string),
                oldType: "varchar(100)",
                oldMaxLength: 100,
                oldComment: "ชื่อจริงคู่สมรส")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<bool>(
                name: "Marry",
                table: "Candidates",
                type: "tinyint(1)",
                nullable: true,
                comment: "คู่สมรส",
                oldClrType: typeof(bool),
                oldType: "tinyint(1)",
                oldComment: "คู่สมรส");

            migrationBuilder.AlterColumn<string>(
                name: "LastName",
                table: "Candidates",
                type: "varchar(100)",
                maxLength: 100,
                nullable: true,
                comment: "นามสกุล",
                oldClrType: typeof(string),
                oldType: "varchar(100)",
                oldMaxLength: 100,
                oldComment: "นามสกุล")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<string>(
                name: "Knowledge",
                table: "Candidates",
                type: "longtext",
                nullable: true,
                comment: "ความสามารถพิเศษ",
                oldClrType: typeof(string),
                oldType: "longtext",
                oldComment: "ความสามารถพิเศษ")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<string>(
                name: "FirstName",
                table: "Candidates",
                type: "varchar(100)",
                maxLength: 100,
                nullable: true,
                comment: "ชื่อจริง",
                oldClrType: typeof(string),
                oldType: "varchar(100)",
                oldMaxLength: 100,
                oldComment: "ชื่อจริง")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<string>(
                name: "FatherLastName",
                table: "Candidates",
                type: "varchar(100)",
                maxLength: 100,
                nullable: true,
                comment: "นามสกุลบิดา",
                oldClrType: typeof(string),
                oldType: "varchar(100)",
                oldMaxLength: 100,
                oldComment: "นามสกุลบิดา")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<string>(
                name: "FatherFirstName",
                table: "Candidates",
                type: "varchar(100)",
                maxLength: 100,
                nullable: true,
                comment: "ชื่อจริงบิดา",
                oldClrType: typeof(string),
                oldType: "varchar(100)",
                oldMaxLength: 100,
                oldComment: "ชื่อจริงบิดา")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<string>(
                name: "Email",
                table: "Candidates",
                type: "varchar(200)",
                maxLength: 200,
                nullable: true,
                comment: "อีเมล",
                oldClrType: typeof(string),
                oldType: "varchar(200)",
                oldMaxLength: 200,
                oldComment: "อีเมล")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<string>(
                name: "CurrentZipCode",
                table: "Candidates",
                type: "varchar(10)",
                maxLength: 10,
                nullable: true,
                comment: "รหัสไปรษณีย์ที่อยู่ปัจจุบัน",
                oldClrType: typeof(string),
                oldType: "varchar(10)",
                oldMaxLength: 10,
                oldComment: "รหัสไปรษณีย์ที่อยู่ปัจจุบัน")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<string>(
                name: "CurrentAddress",
                table: "Candidates",
                type: "longtext",
                nullable: true,
                comment: "ที่อยู่ปัจจุบัน",
                oldClrType: typeof(string),
                oldType: "longtext",
                oldComment: "ที่อยู่ปัจจุบัน")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<string>(
                name: "CitizenId",
                table: "Candidates",
                type: "varchar(20)",
                maxLength: 20,
                nullable: true,
                comment: "เลขประจำตัวประชาชน",
                oldClrType: typeof(string),
                oldType: "varchar(20)",
                oldMaxLength: 20,
                oldComment: "เลขประจำตัวประชาชน")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.UpdateData(
                table: "Candidates",
                keyColumn: "Telephone",
                keyValue: null,
                column: "Telephone",
                value: "");

            migrationBuilder.AlterColumn<string>(
                name: "Telephone",
                table: "Candidates",
                type: "varchar(20)",
                maxLength: 20,
                nullable: false,
                comment: "โทรศัพท์",
                oldClrType: typeof(string),
                oldType: "varchar(20)",
                oldMaxLength: 20,
                oldNullable: true,
                oldComment: "โทรศัพท์")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.UpdateData(
                table: "Candidates",
                keyColumn: "RegistZipCode",
                keyValue: null,
                column: "RegistZipCode",
                value: "");

            migrationBuilder.AlterColumn<string>(
                name: "RegistZipCode",
                table: "Candidates",
                type: "varchar(10)",
                maxLength: 10,
                nullable: false,
                comment: "รหัสไปรษณีย์ที่อยู่ตามทะเบียนบ้าน",
                oldClrType: typeof(string),
                oldType: "varchar(10)",
                oldMaxLength: 10,
                oldNullable: true,
                oldComment: "รหัสไปรษณีย์ที่อยู่ตามทะเบียนบ้าน")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<bool>(
                name: "RegistSame",
                table: "Candidates",
                type: "tinyint(1)",
                nullable: false,
                defaultValue: false,
                comment: "ที่อยู่ปัจจุบันเหมือนที่อยู่ตามทะเบียนบ้าน",
                oldClrType: typeof(bool),
                oldType: "tinyint(1)",
                oldNullable: true,
                oldComment: "ที่อยู่ปัจจุบันเหมือนที่อยู่ตามทะเบียนบ้าน");

            migrationBuilder.UpdateData(
                table: "Candidates",
                keyColumn: "RegistAddress",
                keyValue: null,
                column: "RegistAddress",
                value: "");

            migrationBuilder.AlterColumn<string>(
                name: "RegistAddress",
                table: "Candidates",
                type: "longtext",
                nullable: false,
                comment: "ที่อยู่ตามทะเบียนบ้าน",
                oldClrType: typeof(string),
                oldType: "longtext",
                oldNullable: true,
                oldComment: "ที่อยู่ตามทะเบียนบ้าน")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.UpdateData(
                table: "Candidates",
                keyColumn: "OccupationType",
                keyValue: null,
                column: "OccupationType",
                value: "");

            migrationBuilder.AlterColumn<string>(
                name: "OccupationType",
                table: "Candidates",
                type: "longtext",
                nullable: false,
                comment: "ประเภทอาชีพที่ทำงานมาก่อน",
                oldClrType: typeof(string),
                oldType: "longtext",
                oldNullable: true,
                oldComment: "ประเภทอาชีพที่ทำงานมาก่อน")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.UpdateData(
                table: "Candidates",
                keyColumn: "OccupationTelephone",
                keyValue: null,
                column: "OccupationTelephone",
                value: "");

            migrationBuilder.AlterColumn<string>(
                name: "OccupationTelephone",
                table: "Candidates",
                type: "varchar(20)",
                maxLength: 20,
                nullable: false,
                comment: "โทรศัพท์ บริษัท",
                oldClrType: typeof(string),
                oldType: "varchar(20)",
                oldMaxLength: 20,
                oldNullable: true,
                oldComment: "โทรศัพท์ บริษัท")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.UpdateData(
                table: "Candidates",
                keyColumn: "OccupationEmail",
                keyValue: null,
                column: "OccupationEmail",
                value: "");

            migrationBuilder.AlterColumn<string>(
                name: "OccupationEmail",
                table: "Candidates",
                type: "varchar(200)",
                maxLength: 200,
                nullable: false,
                comment: "อีเมล บริษัท",
                oldClrType: typeof(string),
                oldType: "varchar(200)",
                oldMaxLength: 200,
                oldNullable: true,
                oldComment: "อีเมล บริษัท")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.UpdateData(
                table: "Candidates",
                keyColumn: "OccupationDepartment",
                keyValue: null,
                column: "OccupationDepartment",
                value: "");

            migrationBuilder.AlterColumn<string>(
                name: "OccupationDepartment",
                table: "Candidates",
                type: "longtext",
                nullable: false,
                comment: "กอง/ฝ่าย บริษัท",
                oldClrType: typeof(string),
                oldType: "longtext",
                oldNullable: true,
                oldComment: "กอง/ฝ่าย บริษัท")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.UpdateData(
                table: "Candidates",
                keyColumn: "OccupationCompany",
                keyValue: null,
                column: "OccupationCompany",
                value: "");

            migrationBuilder.AlterColumn<string>(
                name: "OccupationCompany",
                table: "Candidates",
                type: "longtext",
                nullable: false,
                comment: "สำนัก/บริษัท บริษัท",
                oldClrType: typeof(string),
                oldType: "longtext",
                oldNullable: true,
                oldComment: "สำนัก/บริษัท บริษัท")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.UpdateData(
                table: "Candidates",
                keyColumn: "Nationality",
                keyValue: null,
                column: "Nationality",
                value: "");

            migrationBuilder.AlterColumn<string>(
                name: "Nationality",
                table: "Candidates",
                type: "varchar(40)",
                maxLength: 40,
                nullable: false,
                comment: "สัญชาติ",
                oldClrType: typeof(string),
                oldType: "varchar(40)",
                oldMaxLength: 40,
                oldNullable: true,
                oldComment: "สัญชาติ")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.UpdateData(
                table: "Candidates",
                keyColumn: "MotherLastName",
                keyValue: null,
                column: "MotherLastName",
                value: "");

            migrationBuilder.AlterColumn<string>(
                name: "MotherLastName",
                table: "Candidates",
                type: "varchar(100)",
                maxLength: 100,
                nullable: false,
                comment: "นามสกุลมารดา",
                oldClrType: typeof(string),
                oldType: "varchar(100)",
                oldMaxLength: 100,
                oldNullable: true,
                oldComment: "นามสกุลมารดา")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.UpdateData(
                table: "Candidates",
                keyColumn: "MotherFirstName",
                keyValue: null,
                column: "MotherFirstName",
                value: "");

            migrationBuilder.AlterColumn<string>(
                name: "MotherFirstName",
                table: "Candidates",
                type: "varchar(100)",
                maxLength: 100,
                nullable: false,
                comment: "ชื่อจริงมารดา",
                oldClrType: typeof(string),
                oldType: "varchar(100)",
                oldMaxLength: 100,
                oldNullable: true,
                oldComment: "ชื่อจริงมารดา")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.UpdateData(
                table: "Candidates",
                keyColumn: "MobilePhone",
                keyValue: null,
                column: "MobilePhone",
                value: "");

            migrationBuilder.AlterColumn<string>(
                name: "MobilePhone",
                table: "Candidates",
                type: "varchar(20)",
                maxLength: 20,
                nullable: false,
                comment: "โทรศัพท์มือถือ",
                oldClrType: typeof(string),
                oldType: "varchar(20)",
                oldMaxLength: 20,
                oldNullable: true,
                oldComment: "โทรศัพท์มือถือ")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.UpdateData(
                table: "Candidates",
                keyColumn: "MarryLastName",
                keyValue: null,
                column: "MarryLastName",
                value: "");

            migrationBuilder.AlterColumn<string>(
                name: "MarryLastName",
                table: "Candidates",
                type: "varchar(100)",
                maxLength: 100,
                nullable: false,
                comment: "นามสกุลคู่สมรส",
                oldClrType: typeof(string),
                oldType: "varchar(100)",
                oldMaxLength: 100,
                oldNullable: true,
                oldComment: "นามสกุลคู่สมรส")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.UpdateData(
                table: "Candidates",
                keyColumn: "MarryFirstName",
                keyValue: null,
                column: "MarryFirstName",
                value: "");

            migrationBuilder.AlterColumn<string>(
                name: "MarryFirstName",
                table: "Candidates",
                type: "varchar(100)",
                maxLength: 100,
                nullable: false,
                comment: "ชื่อจริงคู่สมรส",
                oldClrType: typeof(string),
                oldType: "varchar(100)",
                oldMaxLength: 100,
                oldNullable: true,
                oldComment: "ชื่อจริงคู่สมรส")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<bool>(
                name: "Marry",
                table: "Candidates",
                type: "tinyint(1)",
                nullable: false,
                defaultValue: false,
                comment: "คู่สมรส",
                oldClrType: typeof(bool),
                oldType: "tinyint(1)",
                oldNullable: true,
                oldComment: "คู่สมรส");

            migrationBuilder.UpdateData(
                table: "Candidates",
                keyColumn: "LastName",
                keyValue: null,
                column: "LastName",
                value: "");

            migrationBuilder.AlterColumn<string>(
                name: "LastName",
                table: "Candidates",
                type: "varchar(100)",
                maxLength: 100,
                nullable: false,
                comment: "นามสกุล",
                oldClrType: typeof(string),
                oldType: "varchar(100)",
                oldMaxLength: 100,
                oldNullable: true,
                oldComment: "นามสกุล")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.UpdateData(
                table: "Candidates",
                keyColumn: "Knowledge",
                keyValue: null,
                column: "Knowledge",
                value: "");

            migrationBuilder.AlterColumn<string>(
                name: "Knowledge",
                table: "Candidates",
                type: "longtext",
                nullable: false,
                comment: "ความสามารถพิเศษ",
                oldClrType: typeof(string),
                oldType: "longtext",
                oldNullable: true,
                oldComment: "ความสามารถพิเศษ")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.UpdateData(
                table: "Candidates",
                keyColumn: "FirstName",
                keyValue: null,
                column: "FirstName",
                value: "");

            migrationBuilder.AlterColumn<string>(
                name: "FirstName",
                table: "Candidates",
                type: "varchar(100)",
                maxLength: 100,
                nullable: false,
                comment: "ชื่อจริง",
                oldClrType: typeof(string),
                oldType: "varchar(100)",
                oldMaxLength: 100,
                oldNullable: true,
                oldComment: "ชื่อจริง")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.UpdateData(
                table: "Candidates",
                keyColumn: "FatherLastName",
                keyValue: null,
                column: "FatherLastName",
                value: "");

            migrationBuilder.AlterColumn<string>(
                name: "FatherLastName",
                table: "Candidates",
                type: "varchar(100)",
                maxLength: 100,
                nullable: false,
                comment: "นามสกุลบิดา",
                oldClrType: typeof(string),
                oldType: "varchar(100)",
                oldMaxLength: 100,
                oldNullable: true,
                oldComment: "นามสกุลบิดา")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.UpdateData(
                table: "Candidates",
                keyColumn: "FatherFirstName",
                keyValue: null,
                column: "FatherFirstName",
                value: "");

            migrationBuilder.AlterColumn<string>(
                name: "FatherFirstName",
                table: "Candidates",
                type: "varchar(100)",
                maxLength: 100,
                nullable: false,
                comment: "ชื่อจริงบิดา",
                oldClrType: typeof(string),
                oldType: "varchar(100)",
                oldMaxLength: 100,
                oldNullable: true,
                oldComment: "ชื่อจริงบิดา")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.UpdateData(
                table: "Candidates",
                keyColumn: "Email",
                keyValue: null,
                column: "Email",
                value: "");

            migrationBuilder.AlterColumn<string>(
                name: "Email",
                table: "Candidates",
                type: "varchar(200)",
                maxLength: 200,
                nullable: false,
                comment: "อีเมล",
                oldClrType: typeof(string),
                oldType: "varchar(200)",
                oldMaxLength: 200,
                oldNullable: true,
                oldComment: "อีเมล")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.UpdateData(
                table: "Candidates",
                keyColumn: "CurrentZipCode",
                keyValue: null,
                column: "CurrentZipCode",
                value: "");

            migrationBuilder.AlterColumn<string>(
                name: "CurrentZipCode",
                table: "Candidates",
                type: "varchar(10)",
                maxLength: 10,
                nullable: false,
                comment: "รหัสไปรษณีย์ที่อยู่ปัจจุบัน",
                oldClrType: typeof(string),
                oldType: "varchar(10)",
                oldMaxLength: 10,
                oldNullable: true,
                oldComment: "รหัสไปรษณีย์ที่อยู่ปัจจุบัน")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.UpdateData(
                table: "Candidates",
                keyColumn: "CurrentAddress",
                keyValue: null,
                column: "CurrentAddress",
                value: "");

            migrationBuilder.AlterColumn<string>(
                name: "CurrentAddress",
                table: "Candidates",
                type: "longtext",
                nullable: false,
                comment: "ที่อยู่ปัจจุบัน",
                oldClrType: typeof(string),
                oldType: "longtext",
                oldNullable: true,
                oldComment: "ที่อยู่ปัจจุบัน")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.UpdateData(
                table: "Candidates",
                keyColumn: "CitizenId",
                keyValue: null,
                column: "CitizenId",
                value: "");

            migrationBuilder.AlterColumn<string>(
                name: "CitizenId",
                table: "Candidates",
                type: "varchar(20)",
                maxLength: 20,
                nullable: false,
                comment: "เลขประจำตัวประชาชน",
                oldClrType: typeof(string),
                oldType: "varchar(20)",
                oldMaxLength: 20,
                oldNullable: true,
                oldComment: "เลขประจำตัวประชาชน")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");
        }
    }
}
