允许为空
migrationBuilder.AlterColumn<string>(
name: "BirthData",
table: "Demo_Author",
type: "datetimeoffset(7)",
nullable: true,
oldNullable:false);
修改字段长度限制
migrationBuilder.AlterColumn<string>(
name: "Email",
table: "Demo_Author",
maxLength: 30,
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "Email",
table: "App_User",
maxLength: 40,
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);