using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace TakeoutSaaS.Infrastructure.Migrations
{
    /// <inheritdoc />
    public partial class AddProductCategoryIconAndChannels : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<string>(
                name: "ChannelsJson",
                table: "product_categories",
                type: "text",
                nullable: false,
                defaultValue: "[\"wm\"]",
                comment: "分类可见渠道 JSON。");

            migrationBuilder.AddColumn<string>(
                name: "Icon",
                table: "product_categories",
                type: "character varying(512)",
                maxLength: 512,
                nullable: true,
                comment: "分类图标。");
        }

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

            migrationBuilder.DropColumn(
                name: "Icon",
                table: "product_categories");
        }
    }
}
