60 lines
2.4 KiB
C#
60 lines
2.4 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace YD_WeChatApplet.Api.Migrations
|
|
{
|
|
public partial class _20250420v1 : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "WorkTypeName",
|
|
table: "WCA_GroupTask",
|
|
type: "nvarchar(200)",
|
|
nullable: true,
|
|
comment: "作业类型名称",
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(200)",
|
|
oldComment: "作业类型名称");
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "WCA_PersonalGoal",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<int>(type: "int", nullable: false, comment: "Id")
|
|
.Annotation("SqlServer:Identity", "1, 1"),
|
|
UserId = table.Column<int>(type: "int", nullable: false, comment: "用户Id"),
|
|
GoalType = table.Column<int>(type: "int", nullable: false, comment: "目标类型"),
|
|
GoalTypeName = table.Column<string>(type: "nvarchar(200)", nullable: false, comment: "目标类型名称"),
|
|
GoalDuration = table.Column<int>(type: "int", nullable: true, comment: "目标时长"),
|
|
GoalAmount = table.Column<int>(type: "int", nullable: true, comment: "目标数量"),
|
|
GoalDate = table.Column<DateTime>(type: "datetime", nullable: false, comment: "目标日期")
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_WCA_PersonalGoal", x => x.Id);
|
|
});
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "WCA_PersonalGoal");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "WorkTypeName",
|
|
table: "WCA_GroupTask",
|
|
type: "nvarchar(200)",
|
|
nullable: false,
|
|
defaultValue: "",
|
|
comment: "作业类型名称",
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(200)",
|
|
oldNullable: true,
|
|
oldComment: "作业类型名称");
|
|
}
|
|
}
|
|
}
|