using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace TakeoutSaaS.Infrastructure.Migrations.IdentityDb
{
    /// <inheritdoc />
    public partial class FixIdentitySchemaMismatch : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterColumn<string>(
                name: "Avatar",
                table: "mini_users",
                type: "text",
                nullable: true,
                comment: "头像地址。",
                oldClrType: typeof(string),
                oldType: "character varying(256)",
                oldMaxLength: 256,
                oldNullable: true,
                oldComment: "头像地址。");

            migrationBuilder.AlterColumn<string>(
                name: "Avatar",
                table: "identity_users",
                type: "text",
                nullable: true,
                comment: "头像地址。",
                oldClrType: typeof(string),
                oldType: "character varying(256)",
                oldMaxLength: 256,
                oldNullable: true,
                oldComment: "头像地址。");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterColumn<string>(
                name: "Avatar",
                table: "mini_users",
                type: "character varying(256)",
                maxLength: 256,
                nullable: true,
                comment: "头像地址。",
                oldClrType: typeof(string),
                oldType: "text",
                oldNullable: true,
                oldComment: "头像地址。");

            migrationBuilder.AlterColumn<string>(
                name: "Avatar",
                table: "identity_users",
                type: "character varying(256)",
                maxLength: 256,
                nullable: true,
                comment: "头像地址。",
                oldClrType: typeof(string),
                oldType: "text",
                oldNullable: true,
                oldComment: "头像地址。");
        }
    }
}
