using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace UserManagement.Domain.Migrations
{
    /// <inheritdoc />
    public partial class SMTP_Settings_MySQL : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "IsEnableSSL",
                table: "EmailSMTPSettings");

            migrationBuilder.AddColumn<string>(
                name: "EncryptionType",
                table: "EmailSMTPSettings",
                type: "longtext",
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "FromEmail",
                table: "EmailSMTPSettings",
                type: "longtext",
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "FromName",
                table: "EmailSMTPSettings",
                type: "longtext",
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");
        }

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

            migrationBuilder.DropColumn(
                name: "FromEmail",
                table: "EmailSMTPSettings");

            migrationBuilder.DropColumn(
                name: "FromName",
                table: "EmailSMTPSettings");

            migrationBuilder.AddColumn<bool>(
                name: "IsEnableSSL",
                table: "EmailSMTPSettings",
                type: "tinyint(1)",
                nullable: false,
                defaultValue: false);
        }
    }
}
