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();
|
.IsRequired();
|
||||||
|
|
||||||
builder.Property(a => a.City)
|
builder.Property(a => a.City)
|
||||||
.HasMaxLength(189)
|
.HasMaxLength(100)
|
||||||
.IsRequired();
|
.IsRequired();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,14 +4,12 @@ using Microsoft.EntityFrameworkCore;
|
|||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
using Microsoft.EntityFrameworkCore.Metadata;
|
using Microsoft.EntityFrameworkCore.Metadata;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
||||||
using Microsoft.eShopWeb.Infrastructure.Data;
|
|
||||||
|
|
||||||
namespace Microsoft.eShopWeb.Infrastructure.Data.Migrations
|
namespace Microsoft.eShopWeb.Infrastructure.Data.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(CatalogContext))]
|
[DbContext(typeof(CatalogContext))]
|
||||||
[Migration("20180725190153_AddExtraConstrains")]
|
[Migration("20180725190153_AddExtraConstraints")]
|
||||||
partial class AddExtraConstrains
|
partial class AddExtraConstraints
|
||||||
{
|
{
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
{
|
{
|
||||||
@@ -184,7 +182,7 @@ namespace Microsoft.eShopWeb.Infrastructure.Data.Migrations
|
|||||||
|
|
||||||
b1.Property<string>("City")
|
b1.Property<string>("City")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasMaxLength(189);
|
.HasMaxLength(100);
|
||||||
|
|
||||||
b1.Property<string>("Country")
|
b1.Property<string>("Country")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace Microsoft.eShopWeb.Infrastructure.Data.Migrations
|
namespace Microsoft.eShopWeb.Infrastructure.Data.Migrations
|
||||||
{
|
{
|
||||||
public partial class AddExtraConstrains : Migration
|
public partial class AddExtraConstraints : Migration
|
||||||
{
|
{
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
{
|
{
|
||||||
@@ -41,7 +41,7 @@ namespace Microsoft.eShopWeb.Infrastructure.Data.Migrations
|
|||||||
migrationBuilder.AlterColumn<string>(
|
migrationBuilder.AlterColumn<string>(
|
||||||
name: "ShipToAddress_City",
|
name: "ShipToAddress_City",
|
||||||
table: "Orders",
|
table: "Orders",
|
||||||
maxLength: 189,
|
maxLength: 100,
|
||||||
nullable: false,
|
nullable: false,
|
||||||
oldClrType: typeof(string),
|
oldClrType: typeof(string),
|
||||||
oldNullable: true);
|
oldNullable: true);
|
||||||
@@ -91,7 +91,7 @@ namespace Microsoft.eShopWeb.Infrastructure.Data.Migrations
|
|||||||
table: "Orders",
|
table: "Orders",
|
||||||
nullable: true,
|
nullable: true,
|
||||||
oldClrType: typeof(string),
|
oldClrType: typeof(string),
|
||||||
oldMaxLength: 189);
|
oldMaxLength: 100);
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
migrationBuilder.AlterColumn<string>(
|
||||||
name: "ItemOrdered_ProductName",
|
name: "ItemOrdered_ProductName",
|
||||||
@@ -3,8 +3,6 @@ using System;
|
|||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
using Microsoft.EntityFrameworkCore.Metadata;
|
using Microsoft.EntityFrameworkCore.Metadata;
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
||||||
using Microsoft.eShopWeb.Infrastructure.Data;
|
|
||||||
|
|
||||||
namespace Microsoft.eShopWeb.Infrastructure.Data.Migrations
|
namespace Microsoft.eShopWeb.Infrastructure.Data.Migrations
|
||||||
{
|
{
|
||||||
@@ -182,7 +180,7 @@ namespace Microsoft.eShopWeb.Infrastructure.Data.Migrations
|
|||||||
|
|
||||||
b1.Property<string>("City")
|
b1.Property<string>("City")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasMaxLength(189);
|
.HasMaxLength(100);
|
||||||
|
|
||||||
b1.Property<string>("Country")
|
b1.Property<string>("Country")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
|
|||||||
Reference in New Issue
Block a user