fix: expand DiscountProducts.FullInformation from nvarchar(2000) to nvarchar(max) — HTML content was getting truncated
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 8m17s

This commit is contained in:
masoodafar-web
2026-02-22 21:44:03 +03:30
parent 0fe4db5e77
commit e3fbd45739
4 changed files with 4820 additions and 4 deletions
@@ -26,8 +26,7 @@ public class DiscountProductConfiguration : IEntityTypeConfiguration<DiscountPro
.HasMaxLength(500);
builder.Property(entity => entity.FullInformation)
.IsRequired()
.HasMaxLength(2000);
.IsRequired();
builder.Property(entity => entity.Price)
.IsRequired();
@@ -0,0 +1,38 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace CMSMicroservice.Infrastructure.Persistence.Migrations
{
/// <inheritdoc />
public partial class ExpandDiscountProductFullInformation : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "FullInformation",
schema: "CMS",
table: "DiscountProducts",
type: "nvarchar(max)",
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(2000)",
oldMaxLength: 2000);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "FullInformation",
schema: "CMS",
table: "DiscountProducts",
type: "nvarchar(2000)",
maxLength: 2000,
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
}
}
}
@@ -1404,8 +1404,7 @@ namespace CMSMicroservice.Infrastructure.Persistence.Migrations
b.Property<string>("FullInformation")
.IsRequired()
.HasMaxLength(2000)
.HasColumnType("nvarchar(2000)");
.HasColumnType("nvarchar(max)");
b.Property<string>("ImagePath")
.IsRequired()