From 502ca0313a4c39012faea5c7644f3e3d17ead194 Mon Sep 17 00:00:00 2001 From: PascalMarchesseault <97350299+PascalMarchesseault@users.noreply.github.com> Date: Sat, 23 Nov 2024 10:51:45 -0500 Subject: [PATCH] Added Thumbnail Mirgration --- src/Web/Features/Contents/Data/Content.cs | 4 ++-- .../Contents/Data/Migrations/ContentDbContextModelSnapshot.cs | 4 ++++ src/Web/Web.csproj | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Web/Features/Contents/Data/Content.cs b/src/Web/Features/Contents/Data/Content.cs index c9f5dfc..6198f8b 100644 --- a/src/Web/Features/Contents/Data/Content.cs +++ b/src/Web/Features/Contents/Data/Content.cs @@ -11,8 +11,8 @@ public class Content public Guid? DeletedBy { get; set; } public DateTimeOffset? DeletedAt { get; set; } [MaxLength(128)] public required string Title { get; set; } - - [MaxLength(512)]public string? ThumbnailUrl { get; init; } + + [MaxLength(512)] public string? ThumbnailUrl { get; set; } = ""; [MaxLength(2048)] public string Description { get; set; } = ""; [MaxLength(2048)] public string? HtmlFileUrl { get; set; } = ""; public IList Reactions { get; set; } = new List(); diff --git a/src/Web/Features/Contents/Data/Migrations/ContentDbContextModelSnapshot.cs b/src/Web/Features/Contents/Data/Migrations/ContentDbContextModelSnapshot.cs index eeaa08b..3640027 100644 --- a/src/Web/Features/Contents/Data/Migrations/ContentDbContextModelSnapshot.cs +++ b/src/Web/Features/Contents/Data/Migrations/ContentDbContextModelSnapshot.cs @@ -52,6 +52,10 @@ namespace Hutopy.Web.Features.Contents.Data.Migrations .HasMaxLength(2048) .HasColumnType("character varying(2048)"); + b.Property("ThumbnailUrl") + .HasMaxLength(512) + .HasColumnType("character varying(512)"); + b.Property("Title") .IsRequired() .HasMaxLength(128) diff --git a/src/Web/Web.csproj b/src/Web/Web.csproj index e5bfd9d..dadd742 100644 --- a/src/Web/Web.csproj +++ b/src/Web/Web.csproj @@ -33,6 +33,7 @@ +