113 lines
3.5 KiB
C#
113 lines
3.5 KiB
C#
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: "最后密码修改时间");
|
|
}
|
|
}
|
|
}
|