YD_WeChatApplet.Api/WeChatApplet/Migrations/20241005143954_init003.cs

113 lines
3.5 KiB
C#
Raw Permalink Normal View History

2025-06-06 14:57:20 +08:00
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace YD_WeChatApplet.Api.Migrations
{
public partial class init003 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "LastLoginDate",
table: "User");
migrationBuilder.DropColumn(
name: "LastModifyPwdDate",
table: "User");
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "User",
type: "nvarchar(200)",
maxLength: 200,
nullable: true,
comment: "备注",
oldClrType: typeof(string),
oldType: "nvarchar(200)",
oldMaxLength: 200,
oldComment: "备注");
migrationBuilder.AlterColumn<string>(
name: "Creator",
table: "User",
type: "nvarchar(200)",
maxLength: 200,
nullable: true,
comment: "创建人",
oldClrType: typeof(string),
oldType: "nvarchar(200)",
oldMaxLength: 200,
oldComment: "创建人");
migrationBuilder.AddColumn<DateTime>(
name: "CreatorDate",
table: "User",
type: "datetime",
nullable: true,
comment: "创建时间");
migrationBuilder.AddColumn<int>(
name: "CreatorID",
table: "User",
type: "int",
nullable: true,
comment: "CreatorID");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "CreatorDate",
table: "User");
migrationBuilder.DropColumn(
name: "CreatorID",
table: "User");
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "User",
type: "nvarchar(200)",
maxLength: 200,
nullable: false,
defaultValue: "",
comment: "备注",
oldClrType: typeof(string),
oldType: "nvarchar(200)",
oldMaxLength: 200,
oldNullable: true,
oldComment: "备注");
migrationBuilder.AlterColumn<string>(
name: "Creator",
table: "User",
type: "nvarchar(200)",
maxLength: 200,
nullable: false,
defaultValue: "",
comment: "创建人",
oldClrType: typeof(string),
oldType: "nvarchar(200)",
oldMaxLength: 200,
oldNullable: true,
oldComment: "创建人");
migrationBuilder.AddColumn<DateTime>(
name: "LastLoginDate",
table: "User",
type: "datetime",
nullable: true,
comment: "最后登陆时间");
migrationBuilder.AddColumn<DateTime>(
name: "LastModifyPwdDate",
table: "User",
type: "datetime",
nullable: true,
comment: "最后密码修改时间");
}
}
}