using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace IRaCIS.Core.Infra.EFCore.Migrations
{
    /// <inheritdoc />
    public partial class emailAddFiled : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterColumn<int>(
                name: "CriterionTypeEnum",
                table: "TrialEmailNoticeConfig",
                type: "int",
                nullable: true,
                comment: "后续删除，需要维护数据",
                oldClrType: typeof(int),
                oldType: "int",
                oldNullable: true);

            migrationBuilder.AddColumn<string>(
                name: "CriterionTypeList",
                table: "TrialEmailNoticeConfig",
                type: "nvarchar(max)",
                nullable: true,
                comment: "邮件配置的多个标准");

            migrationBuilder.AlterColumn<int>(
                name: "CriterionTypeEnum",
                table: "EmailNoticeConfig",
                type: "int",
                nullable: true,
                comment: "标准枚举--后续废弃，这里可以选择多个标准",
                oldClrType: typeof(int),
                oldType: "int",
                oldNullable: true,
                oldComment: "标准枚举");

            migrationBuilder.AddColumn<string>(
                name: "CriterionTypeList",
                table: "EmailNoticeConfig",
                type: "nvarchar(max)",
                nullable: true,
                comment: "邮件配置的多个标准");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "CriterionTypeList",
                table: "TrialEmailNoticeConfig");

            migrationBuilder.DropColumn(
                name: "CriterionTypeList",
                table: "EmailNoticeConfig");

            migrationBuilder.AlterColumn<int>(
                name: "CriterionTypeEnum",
                table: "TrialEmailNoticeConfig",
                type: "int",
                nullable: true,
                oldClrType: typeof(int),
                oldType: "int",
                oldNullable: true,
                oldComment: "后续删除，需要维护数据");

            migrationBuilder.AlterColumn<int>(
                name: "CriterionTypeEnum",
                table: "EmailNoticeConfig",
                type: "int",
                nullable: true,
                comment: "标准枚举",
                oldClrType: typeof(int),
                oldType: "int",
                oldNullable: true,
                oldComment: "标准枚举--后续废弃，这里可以选择多个标准");
        }
    }
}
