using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace bitforum.Migrations.DefaultDb
{
    /// <inheritdoc />
    public partial class a2 : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterColumn<string>(
                name: "Code",
                table: "EmailVerifyNumber",
                type: "nvarchar(10)",
                maxLength: 10,
                nullable: false,
                comment: "Code",
                oldClrType: typeof(string),
                oldType: "nvarchar(10)",
                oldMaxLength: 10,
                oldComment: "Token");

            migrationBuilder.CreateIndex(
                name: "IX_MemberGrade_IsActive",
                table: "MemberGrade",
                column: "IsActive");

            migrationBuilder.CreateIndex(
                name: "IX_MemberGrade_Order",
                table: "MemberGrade",
                column: "Order");

            migrationBuilder.CreateIndex(
                name: "IX_Member_CreatedAt",
                table: "Member",
                column: "CreatedAt");

            migrationBuilder.CreateIndex(
                name: "IX_Member_DeletedAt",
                table: "Member",
                column: "DeletedAt");

            migrationBuilder.CreateIndex(
                name: "IX_Member_Gender",
                table: "Member",
                column: "Gender");

            migrationBuilder.CreateIndex(
                name: "IX_EmailVerifyToken_Token",
                table: "EmailVerifyToken",
                column: "Token");

            migrationBuilder.CreateIndex(
                name: "IX_EmailVerifyNumber_Code",
                table: "EmailVerifyNumber",
                column: "Code");
        }

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

            migrationBuilder.DropIndex(
                name: "IX_MemberGrade_Order",
                table: "MemberGrade");

            migrationBuilder.DropIndex(
                name: "IX_Member_CreatedAt",
                table: "Member");

            migrationBuilder.DropIndex(
                name: "IX_Member_DeletedAt",
                table: "Member");

            migrationBuilder.DropIndex(
                name: "IX_Member_Gender",
                table: "Member");

            migrationBuilder.DropIndex(
                name: "IX_EmailVerifyToken_Token",
                table: "EmailVerifyToken");

            migrationBuilder.DropIndex(
                name: "IX_EmailVerifyNumber_Code",
                table: "EmailVerifyNumber");

            migrationBuilder.AlterColumn<string>(
                name: "Code",
                table: "EmailVerifyNumber",
                type: "nvarchar(10)",
                maxLength: 10,
                nullable: false,
                comment: "Token",
                oldClrType: typeof(string),
                oldType: "nvarchar(10)",
                oldMaxLength: 10,
                oldComment: "Code");
        }
    }
}
