198 lines
6.5 KiB
C#
198 lines
6.5 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace YD_XinWei.Api.Migrations
|
|
{
|
|
public partial class init009 : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "UserTrueName",
|
|
table: "User",
|
|
type: "nvarchar(200)",
|
|
maxLength: 200,
|
|
nullable: true,
|
|
comment: "姓名",
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(200)",
|
|
oldMaxLength: 200,
|
|
oldComment: "姓名");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "UserPwd",
|
|
table: "User",
|
|
type: "nvarchar(200)",
|
|
maxLength: 200,
|
|
nullable: true,
|
|
comment: "密码",
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(200)",
|
|
oldMaxLength: 200,
|
|
oldComment: "密码");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "RoleName",
|
|
table: "User",
|
|
type: "nvarchar(200)",
|
|
maxLength: 200,
|
|
nullable: true,
|
|
comment: "角色",
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(200)",
|
|
oldMaxLength: 200,
|
|
oldComment: "角色");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "PhoneNo",
|
|
table: "User",
|
|
type: "nvarchar(11)",
|
|
maxLength: 11,
|
|
nullable: true,
|
|
comment: "手机号",
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(11)",
|
|
oldMaxLength: 11,
|
|
oldComment: "手机号");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "HeadImageUrl",
|
|
table: "User",
|
|
type: "nvarchar(500)",
|
|
maxLength: 500,
|
|
nullable: true,
|
|
comment: "头像",
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(500)",
|
|
oldMaxLength: 500,
|
|
oldComment: "头像");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Email",
|
|
table: "User",
|
|
type: "nvarchar(100)",
|
|
maxLength: 100,
|
|
nullable: true,
|
|
comment: "Email",
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(100)",
|
|
oldMaxLength: 100,
|
|
oldComment: "Email");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Address",
|
|
table: "User",
|
|
type: "nvarchar(200)",
|
|
maxLength: 200,
|
|
nullable: true,
|
|
comment: "地址",
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(200)",
|
|
oldMaxLength: 200,
|
|
oldComment: "地址");
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "UserTrueName",
|
|
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: "UserPwd",
|
|
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: "RoleName",
|
|
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: "PhoneNo",
|
|
table: "User",
|
|
type: "nvarchar(11)",
|
|
maxLength: 11,
|
|
nullable: false,
|
|
defaultValue: "",
|
|
comment: "手机号",
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(11)",
|
|
oldMaxLength: 11,
|
|
oldNullable: true,
|
|
oldComment: "手机号");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "HeadImageUrl",
|
|
table: "User",
|
|
type: "nvarchar(500)",
|
|
maxLength: 500,
|
|
nullable: false,
|
|
defaultValue: "",
|
|
comment: "头像",
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(500)",
|
|
oldMaxLength: 500,
|
|
oldNullable: true,
|
|
oldComment: "头像");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Email",
|
|
table: "User",
|
|
type: "nvarchar(100)",
|
|
maxLength: 100,
|
|
nullable: false,
|
|
defaultValue: "",
|
|
comment: "Email",
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(100)",
|
|
oldMaxLength: 100,
|
|
oldNullable: true,
|
|
oldComment: "Email");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Address",
|
|
table: "User",
|
|
type: "nvarchar(200)",
|
|
maxLength: 200,
|
|
nullable: false,
|
|
defaultValue: "",
|
|
comment: "地址",
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(200)",
|
|
oldMaxLength: 200,
|
|
oldNullable: true,
|
|
oldComment: "地址");
|
|
}
|
|
}
|
|
}
|