using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace TakeoutSaaS.Infrastructure.Migrations
{
///
public partial class AddProductDetailRichFields : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn(
name: "PackingFee",
table: "products",
type: "numeric(18,2)",
precision: 18,
scale: 2,
nullable: true,
comment: "打包费(元/份)。");
migrationBuilder.AddColumn(
name: "SortWeight",
table: "products",
type: "integer",
nullable: false,
defaultValue: 0,
comment: "排序权重,越大越靠前。");
migrationBuilder.AddColumn(
name: "WarningStock",
table: "products",
type: "integer",
nullable: true,
comment: "库存预警值。");
migrationBuilder.AddColumn(
name: "IsEnabled",
table: "product_skus",
type: "boolean",
nullable: false,
defaultValue: true,
comment: "是否启用。");
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "PackingFee",
table: "products");
migrationBuilder.DropColumn(
name: "SortWeight",
table: "products");
migrationBuilder.DropColumn(
name: "WarningStock",
table: "products");
migrationBuilder.DropColumn(
name: "IsEnabled",
table: "product_skus");
}
}
}