Browse Source

Add missing maxlength to PaymentMethod in Order entity

pull/64/head
enisn 5 years ago
parent
commit
4a9dc6cec1
  1. 7
      services/ordering/src/EShopOnAbp.OrderingService.EntityFrameworkCore/EntityFrameworkCore/OrderingServiceDbContext.cs
  2. 5
      services/ordering/src/EShopOnAbp.OrderingService.EntityFrameworkCore/Migrations/20220118090449_Removed_PaymentType.Designer.cs
  3. 3
      services/ordering/src/EShopOnAbp.OrderingService.EntityFrameworkCore/Migrations/20220118090449_Removed_PaymentType.cs
  4. 3
      services/ordering/src/EShopOnAbp.OrderingService.EntityFrameworkCore/Migrations/OrderingServiceDbContextModelSnapshot.cs

7
services/ordering/src/EShopOnAbp.OrderingService.EntityFrameworkCore/EntityFrameworkCore/OrderingServiceDbContext.cs

@ -32,7 +32,8 @@ public class OrderingServiceDbContext : AbpDbContext<OrderingServiceDbContext>,
b.ToTable(OrderingServiceDbProperties.DbTablePrefix + "Orders", OrderingServiceDbProperties.DbSchema); b.ToTable(OrderingServiceDbProperties.DbTablePrefix + "Orders", OrderingServiceDbProperties.DbSchema);
b.ConfigureByConvention(); //auto configure for the base class props b.ConfigureByConvention(); //auto configure for the base class props
b.Property(q => q.PaymentStatus).HasMaxLength(OrderConstants.PaymentStatusMaxLength); b.Property(q => q.PaymentStatus).HasMaxLength(OrderConstants.PaymentStatusMaxLength);
b.Property(q => q.PaymentMethod).HasMaxLength(OrderConstants.OrderPaymentMethodNameMaxLength);
b.OwnsOne(o => o.Address, a => { a.WithOwner(); }); b.OwnsOne(o => o.Address, a => { a.WithOwner(); });
b.OwnsOne(o => o.Buyer, a => { a.WithOwner(); }); b.OwnsOne(o => o.Buyer, a => { a.WithOwner(); });
@ -52,7 +53,7 @@ public class OrderingServiceDbContext : AbpDbContext<OrderingServiceDbContext>,
OrderingServiceDbProperties.DbSchema); OrderingServiceDbProperties.DbSchema);
b.ConfigureByConvention(); //auto configure for the base class props b.ConfigureByConvention(); //auto configure for the base class props
b.Property<Guid>("OrderId").IsRequired(); b.Property<Guid>("OrderId").IsRequired();
b.Property(q => q.ProductId).IsRequired(); b.Property(q => q.ProductId).IsRequired();
b.Property(q => q.ProductCode).IsRequired(); b.Property(q => q.ProductCode).IsRequired();
b.Property(q => q.ProductName).IsRequired(); b.Property(q => q.ProductName).IsRequired();
@ -68,7 +69,7 @@ public class OrderingServiceDbContext : AbpDbContext<OrderingServiceDbContext>,
OrderingServiceDbProperties.DbSchema); OrderingServiceDbProperties.DbSchema);
b.ConfigureByConvention(); //auto configure for the base class props b.ConfigureByConvention(); //auto configure for the base class props
b.HasKey(q => q.Id); b.HasKey(q => q.Id);
b.Property(q => q.Id) b.Property(q => q.Id)
.HasDefaultValue(1) .HasDefaultValue(1)

5
services/ordering/src/EShopOnAbp.OrderingService.EntityFrameworkCore/Migrations/20220118084223_Removed_PaymentType.Designer.cs → services/ordering/src/EShopOnAbp.OrderingService.EntityFrameworkCore/Migrations/20220118090449_Removed_PaymentType.Designer.cs

@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore;
namespace EShopOnAbp.OrderingService.Migrations namespace EShopOnAbp.OrderingService.Migrations
{ {
[DbContext(typeof(OrderingServiceDbContext))] [DbContext(typeof(OrderingServiceDbContext))]
[Migration("20220118084223_Removed_PaymentType")] [Migration("20220118090449_Removed_PaymentType")]
partial class Removed_PaymentType partial class Removed_PaymentType
{ {
protected override void BuildTargetModel(ModelBuilder modelBuilder) protected override void BuildTargetModel(ModelBuilder modelBuilder)
@ -48,7 +48,8 @@ namespace EShopOnAbp.OrderingService.Migrations
.HasColumnType("integer"); .HasColumnType("integer");
b.Property<string>("PaymentMethod") b.Property<string>("PaymentMethod")
.HasColumnType("text"); .HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<Guid?>("PaymentRequestId") b.Property<Guid?>("PaymentRequestId")
.HasColumnType("uuid"); .HasColumnType("uuid");

3
services/ordering/src/EShopOnAbp.OrderingService.EntityFrameworkCore/Migrations/20220118084223_Removed_PaymentType.cs → services/ordering/src/EShopOnAbp.OrderingService.EntityFrameworkCore/Migrations/20220118090449_Removed_PaymentType.cs

@ -26,7 +26,8 @@ namespace EShopOnAbp.OrderingService.Migrations
migrationBuilder.AddColumn<string>( migrationBuilder.AddColumn<string>(
name: "PaymentMethod", name: "PaymentMethod",
table: "Orders", table: "Orders",
type: "text", type: "character varying(128)",
maxLength: 128,
nullable: true); nullable: true);
} }

3
services/ordering/src/EShopOnAbp.OrderingService.EntityFrameworkCore/Migrations/OrderingServiceDbContextModelSnapshot.cs

@ -46,7 +46,8 @@ namespace EShopOnAbp.OrderingService.Migrations
.HasColumnType("integer"); .HasColumnType("integer");
b.Property<string>("PaymentMethod") b.Property<string>("PaymentMethod")
.HasColumnType("text"); .HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<Guid?>("PaymentRequestId") b.Property<Guid?>("PaymentRequestId")
.HasColumnType("uuid"); .HasColumnType("uuid");

Loading…
Cancel
Save