using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Infrastructure.Migrations.AppDb
{
    /// <inheritdoc />
    public partial class UpdateDonateAlert : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.RenameColumn(
                name: "ThumbnailUrl",
                table: "DonationAlertConfig",
                newName: "SoundUrl");

            migrationBuilder.RenameColumn(
                name: "Sound",
                table: "DonationAlertConfig",
                newName: "ImageUrl");

            migrationBuilder.RenameColumn(
                name: "EnableThumbnail",
                table: "DonationAlertConfig",
                newName: "EnableSound");

            migrationBuilder.AddColumn<string>(
                name: "AmountFontColor",
                table: "DonationAlertConfig",
                type: "nvarchar(20)",
                maxLength: 20,
                nullable: false,
                defaultValue: "");

            migrationBuilder.AddColumn<string>(
                name: "AmountFontFamily",
                table: "DonationAlertConfig",
                type: "nvarchar(100)",
                maxLength: 100,
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "AmountFontSize",
                table: "DonationAlertConfig",
                type: "int",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<bool>(
                name: "EnableImage",
                table: "DonationAlertConfig",
                type: "bit",
                nullable: false,
                defaultValue: false);

            migrationBuilder.AddColumn<int>(
                name: "MatchType",
                table: "DonationAlertConfig",
                type: "int",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<string>(
                name: "MessageFontColor",
                table: "DonationAlertConfig",
                type: "nvarchar(20)",
                maxLength: 20,
                nullable: false,
                defaultValue: "");

            migrationBuilder.AddColumn<string>(
                name: "MessageFontFamily",
                table: "DonationAlertConfig",
                type: "nvarchar(100)",
                maxLength: 100,
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "MessageFontSize",
                table: "DonationAlertConfig",
                type: "int",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<string>(
                name: "NicknameFontColor",
                table: "DonationAlertConfig",
                type: "nvarchar(20)",
                maxLength: 20,
                nullable: false,
                defaultValue: "");

            migrationBuilder.AddColumn<string>(
                name: "NicknameFontFamily",
                table: "DonationAlertConfig",
                type: "nvarchar(100)",
                maxLength: 100,
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "NicknameFontSize",
                table: "DonationAlertConfig",
                type: "int",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<string>(
                name: "PopupEffect",
                table: "DonationAlertConfig",
                type: "nvarchar(50)",
                maxLength: 50,
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "TextEffect",
                table: "DonationAlertConfig",
                type: "nvarchar(50)",
                maxLength: 50,
                nullable: true);

            migrationBuilder.CreateIndex(
                name: "IX_DonationAlertConfig_ChannelID_MatchType_Amount",
                table: "DonationAlertConfig",
                columns: new[] { "ChannelID", "MatchType", "Amount" });
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropIndex(
                name: "IX_DonationAlertConfig_ChannelID_MatchType_Amount",
                table: "DonationAlertConfig");

            migrationBuilder.DropColumn(
                name: "AmountFontColor",
                table: "DonationAlertConfig");

            migrationBuilder.DropColumn(
                name: "AmountFontFamily",
                table: "DonationAlertConfig");

            migrationBuilder.DropColumn(
                name: "AmountFontSize",
                table: "DonationAlertConfig");

            migrationBuilder.DropColumn(
                name: "EnableImage",
                table: "DonationAlertConfig");

            migrationBuilder.DropColumn(
                name: "MatchType",
                table: "DonationAlertConfig");

            migrationBuilder.DropColumn(
                name: "MessageFontColor",
                table: "DonationAlertConfig");

            migrationBuilder.DropColumn(
                name: "MessageFontFamily",
                table: "DonationAlertConfig");

            migrationBuilder.DropColumn(
                name: "MessageFontSize",
                table: "DonationAlertConfig");

            migrationBuilder.DropColumn(
                name: "NicknameFontColor",
                table: "DonationAlertConfig");

            migrationBuilder.DropColumn(
                name: "NicknameFontFamily",
                table: "DonationAlertConfig");

            migrationBuilder.DropColumn(
                name: "NicknameFontSize",
                table: "DonationAlertConfig");

            migrationBuilder.DropColumn(
                name: "PopupEffect",
                table: "DonationAlertConfig");

            migrationBuilder.DropColumn(
                name: "TextEffect",
                table: "DonationAlertConfig");

            migrationBuilder.RenameColumn(
                name: "SoundUrl",
                table: "DonationAlertConfig",
                newName: "ThumbnailUrl");

            migrationBuilder.RenameColumn(
                name: "ImageUrl",
                table: "DonationAlertConfig",
                newName: "Sound");

            migrationBuilder.RenameColumn(
                name: "EnableSound",
                table: "DonationAlertConfig",
                newName: "EnableThumbnail");
        }
    }
}
