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.
 
 
 
 
 

103 lines
3.4 KiB

using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Microsoft.eShopWeb.Infrastructure.Data.Migrations
{
public partial class FixShipToAddress : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "ShipToAddress_ZipCode",
table: "Orders",
type: "nvarchar(18)",
maxLength: 18,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(18)",
oldMaxLength: 18,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "ShipToAddress_Street",
table: "Orders",
type: "nvarchar(180)",
maxLength: 180,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(180)",
oldMaxLength: 180,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "ShipToAddress_Country",
table: "Orders",
type: "nvarchar(90)",
maxLength: 90,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(90)",
oldMaxLength: 90,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "ShipToAddress_City",
table: "Orders",
type: "nvarchar(100)",
maxLength: 100,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(100)",
oldMaxLength: 100,
oldNullable: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "ShipToAddress_ZipCode",
table: "Orders",
type: "nvarchar(18)",
maxLength: 18,
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(18)",
oldMaxLength: 18);
migrationBuilder.AlterColumn<string>(
name: "ShipToAddress_Street",
table: "Orders",
type: "nvarchar(180)",
maxLength: 180,
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(180)",
oldMaxLength: 180);
migrationBuilder.AlterColumn<string>(
name: "ShipToAddress_Country",
table: "Orders",
type: "nvarchar(90)",
maxLength: 90,
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(90)",
oldMaxLength: 90);
migrationBuilder.AlterColumn<string>(
name: "ShipToAddress_City",
table: "Orders",
type: "nvarchar(100)",
maxLength: 100,
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(100)",
oldMaxLength: 100);
}
}
}