Sample ASP.NET Core 6.0 reference application, powered by Microsoft, demonstrating a layered application architecture with monolithic deployment model. Download the eBook PDF from docs folder.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

53 lines
1.7 KiB

using Microsoft.EntityFrameworkCore.Migrations;
namespace Microsoft.eShopWeb.Infrastructure.Data.Migrations
{
public partial class FixBuyerId : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "BuyerId",
table: "Orders",
type: "nvarchar(256)",
maxLength: 256,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "BuyerId",
table: "Baskets",
type: "nvarchar(256)",
maxLength: 256,
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(40)",
oldMaxLength: 40);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "BuyerId",
table: "Orders",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(256)",
oldMaxLength: 256);
migrationBuilder.AlterColumn<string>(
name: "BuyerId",
table: "Baskets",
type: "nvarchar(40)",
maxLength: 40,
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(256)",
oldMaxLength: 256);
}
}
}