Updates to existing PR
- updating City value to be 100 instead of 189. The longest city name in the world is 85 characters long, so making it 100 just in case. - Fixed typo in file name: constrains to constraints
This commit is contained in:
@@ -57,7 +57,7 @@ namespace Microsoft.eShopWeb.Infrastructure.Data
|
||||
.IsRequired();
|
||||
|
||||
builder.Property(a => a.City)
|
||||
.HasMaxLength(189)
|
||||
.HasMaxLength(100)
|
||||
.IsRequired();
|
||||
}
|
||||
|
||||
|
||||
@@ -4,14 +4,12 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Microsoft.eShopWeb.Infrastructure.Data;
|
||||
|
||||
namespace Microsoft.eShopWeb.Infrastructure.Data.Migrations
|
||||
{
|
||||
[DbContext(typeof(CatalogContext))]
|
||||
[Migration("20180725190153_AddExtraConstrains")]
|
||||
partial class AddExtraConstrains
|
||||
[Migration("20180725190153_AddExtraConstraints")]
|
||||
partial class AddExtraConstraints
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
@@ -184,7 +182,7 @@ namespace Microsoft.eShopWeb.Infrastructure.Data.Migrations
|
||||
|
||||
b1.Property<string>("City")
|
||||
.IsRequired()
|
||||
.HasMaxLength(189);
|
||||
.HasMaxLength(100);
|
||||
|
||||
b1.Property<string>("Country")
|
||||
.IsRequired()
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace Microsoft.eShopWeb.Infrastructure.Data.Migrations
|
||||
{
|
||||
public partial class AddExtraConstrains : Migration
|
||||
public partial class AddExtraConstraints : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
@@ -41,7 +41,7 @@ namespace Microsoft.eShopWeb.Infrastructure.Data.Migrations
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "ShipToAddress_City",
|
||||
table: "Orders",
|
||||
maxLength: 189,
|
||||
maxLength: 100,
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldNullable: true);
|
||||
@@ -91,7 +91,7 @@ namespace Microsoft.eShopWeb.Infrastructure.Data.Migrations
|
||||
table: "Orders",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldMaxLength: 189);
|
||||
oldMaxLength: 100);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "ItemOrdered_ProductName",
|
||||
@@ -3,8 +3,6 @@ using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Microsoft.eShopWeb.Infrastructure.Data;
|
||||
|
||||
namespace Microsoft.eShopWeb.Infrastructure.Data.Migrations
|
||||
{
|
||||
@@ -182,7 +180,7 @@ namespace Microsoft.eShopWeb.Infrastructure.Data.Migrations
|
||||
|
||||
b1.Property<string>("City")
|
||||
.IsRequired()
|
||||
.HasMaxLength(189);
|
||||
.HasMaxLength(100);
|
||||
|
||||
b1.Property<string>("Country")
|
||||
.IsRequired()
|
||||
|
||||
Reference in New Issue
Block a user