fix: 修复套餐新增草稿默认值与开关落库

This commit is contained in:
2025-12-15 21:06:23 +08:00
parent 17a697b9c8
commit fd377624d8
5 changed files with 6831 additions and 5 deletions

View File

@@ -0,0 +1,42 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace TakeoutSaaS.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class ChangeTenantPackageDefaults : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<int>(
name: "PublishStatus",
table: "tenant_packages",
type: "integer",
nullable: false,
defaultValue: 0,
comment: "发布状态0=草稿1=已发布。",
oldClrType: typeof(int),
oldType: "integer",
oldDefaultValue: 1,
oldComment: "发布状态0=草稿1=已发布。");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<int>(
name: "PublishStatus",
table: "tenant_packages",
type: "integer",
nullable: false,
defaultValue: 1,
comment: "发布状态0=草稿1=已发布。",
oldClrType: typeof(int),
oldType: "integer",
oldDefaultValue: 0,
oldComment: "发布状态0=草稿1=已发布。");
}
}
}

View File

@@ -6298,7 +6298,7 @@ namespace TakeoutSaaS.Infrastructure.Migrations
b.Property<int>("PublishStatus")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasDefaultValue(1)
.HasDefaultValue(0)
.HasComment("发布状态0=草稿1=已发布。");
b.Property<int>("SortOrder")