diff --git a/backend/src/Web/Features/Contents/Data/Content.cs b/backend/src/Web/Features/Contents/Data/Content.cs index 6198f8b..f6e08fc 100644 --- a/backend/src/Web/Features/Contents/Data/Content.cs +++ b/backend/src/Web/Features/Contents/Data/Content.cs @@ -12,9 +12,9 @@ public class Content public DateTimeOffset? DeletedAt { get; set; } [MaxLength(128)] public required string Title { get; set; } - [MaxLength(512)] public string? ThumbnailUrl { get; set; } = ""; + [MaxLength(1024)] public string? ThumbnailUrl { get; set; } = ""; [MaxLength(2048)] public string Description { get; set; } = ""; - [MaxLength(2048)] public string? HtmlFileUrl { get; set; } = ""; + [MaxLength(1024)] public string? HtmlFileUrl { get; set; } = ""; public IList Reactions { get; set; } = new List(); public string[]? Urls { get; init; } diff --git a/backend/src/Web/Features/Contents/Data/Creator.cs b/backend/src/Web/Features/Contents/Data/Creator.cs index 762349d..9bf9999 100644 --- a/backend/src/Web/Features/Contents/Data/Creator.cs +++ b/backend/src/Web/Features/Contents/Data/Creator.cs @@ -18,14 +18,14 @@ public class Creator public class Socials { - [MaxLength(255)] public string? FacebookUrl { get; set; } - [MaxLength(255)] public string? InstagramUrl { get; set; } - [MaxLength(255)] public string? XUrl { get; set; } - [MaxLength(255)] public string? LinkedInUrl { get; set; } - [MaxLength(255)] public string? TikTokUrl { get; set; } - [MaxLength(255)] public string? YoutubeUrl { get; set; } - [MaxLength(255)] public string? RedditUrl { get; set; } - [MaxLength(255)] public string? WebsiteUrl { get; set; } + [MaxLength(1024)] public string? FacebookUrl { get; set; } + [MaxLength(1024)] public string? InstagramUrl { get; set; } + [MaxLength(1024)] public string? XUrl { get; set; } + [MaxLength(1024)] public string? LinkedInUrl { get; set; } + [MaxLength(1024)] public string? TikTokUrl { get; set; } + [MaxLength(1024)] public string? YoutubeUrl { get; set; } + [MaxLength(1024)] public string? RedditUrl { get; set; } + [MaxLength(1024)] public string? WebsiteUrl { get; set; } } public class Images @@ -39,18 +39,18 @@ public class PresentationInfos [MaxLength(255)] public string PhoneNumber { get; set; } = string.Empty; [MaxLength(255)] public string Email { get; set; } = string.Empty; [MaxLength(2000)] public string Title { get; set; } = string.Empty; - [MaxLength(2000)] public string MainImageUrl { get; set; } = string.Empty; + [MaxLength(1024)] public string MainImageUrl { get; set; } = string.Empty; [MaxLength(10000)] public string MainImageText { get; set; } = string.Empty; [MaxLength(10000)] public string MainVideoText { get; set; } = string.Empty; [MaxLength(2000)] public string ImagesSubtitle { get; set; } = string.Empty; - [MaxLength(2000)] public string Image1Url { get; set; } = string.Empty; - [MaxLength(2000)] public string Image2Url { get; set; } = string.Empty; - [MaxLength(2000)] public string Image3Url { get; set; } = string.Empty; - [MaxLength(2000)] public string Image4Url { get; set; } = string.Empty; + [MaxLength(1024)] public string Image1Url { get; set; } = string.Empty; + [MaxLength(1024)] public string Image2Url { get; set; } = string.Empty; + [MaxLength(1024)] public string Image3Url { get; set; } = string.Empty; + [MaxLength(1024)] public string Image4Url { get; set; } = string.Empty; [MaxLength(10000)] public string ImagesText { get; set; } = string.Empty; [MaxLength(2000)] public string VideoSubtitle { get; set; } = string.Empty; [MaxLength(2000)] public string VideoSubtitleMain { get; set; } = string.Empty; [MaxLength(2000)] public string VideoUrlMain { get; set; } = string.Empty; - [MaxLength(2000)] public string VideoUrl { get; set; } = string.Empty; + [MaxLength(1024)] public string VideoUrl { get; set; } = string.Empty; [MaxLength(10000)] public string VideoText { get; set; } = string.Empty; } diff --git a/backend/src/Web/Features/Contents/Data/Migrations/20250402024746_EnsureUrlsAre1024Chars.Designer.cs b/backend/src/Web/Features/Contents/Data/Migrations/20250402024746_EnsureUrlsAre1024Chars.Designer.cs new file mode 100644 index 0000000..2ea7213 --- /dev/null +++ b/backend/src/Web/Features/Contents/Data/Migrations/20250402024746_EnsureUrlsAre1024Chars.Designer.cs @@ -0,0 +1,376 @@ +// +using System; +using Hutopy.Web.Features.Contents.Data; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace Hutopy.Web.Features.Contents.Data.Migrations +{ + [DbContext(typeof(ContentDbContext))] + [Migration("20250402024746_EnsureUrlsAre1024Chars")] + partial class EnsureUrlsAre1024Chars + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasDefaultSchema("Content") + .HasAnnotation("ProductVersion", "9.0.3") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + + modelBuilder.Entity("Hutopy.Web.Features.Contents.Data.Content", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("CreatedAt") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + b.Property("CreatedBy") + .HasColumnType("uuid"); + + b.Property("DeletedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("DeletedBy") + .HasColumnType("uuid"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(2048) + .HasColumnType("character varying(2048)"); + + b.Property("HtmlFileUrl") + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b.Property("ThumbnailUrl") + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.PrimitiveCollection("Urls") + .HasColumnType("text[]"); + + b.HasKey("Id"); + + b.HasIndex("CreatedBy"); + + b.ToTable("Contents", "Content"); + }); + + modelBuilder.Entity("Hutopy.Web.Features.Contents.Data.Creator", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("AcceptDonation") + .HasColumnType("boolean"); + + b.Property("CreatedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("CreatedBy") + .HasColumnType("uuid"); + + b.Property("SlugsId") + .HasColumnType("uuid"); + + b.Property("Title") + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("Verified") + .HasColumnType("boolean"); + + b.HasKey("Id"); + + b.HasIndex("SlugsId"); + + b.ToTable("Creators", "Content"); + }); + + modelBuilder.Entity("Hutopy.Web.Features.Contents.Data.Slugs", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("Active") + .HasColumnType("boolean"); + + b.Property("CreatedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("CreatedBy") + .HasColumnType("uuid"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("NormalizedName") + .IsRequired() + .ValueGeneratedOnAddOrUpdate() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComputedColumnSql("LOWER( \"Content\".\"Slugs\".\"Name\")", true); + + b.Property("ReservedUntil") + .HasColumnType("timestamp with time zone"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName") + .IsUnique(); + + b.ToTable("Slugs", "Content"); + }); + + modelBuilder.Entity("Hutopy.Web.Features.Contents.Data.Content", b => + { + b.HasOne("Hutopy.Web.Features.Contents.Data.Creator", "Creator") + .WithMany() + .HasForeignKey("CreatedBy") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.OwnsMany("Hutopy.Web.Features.Contents.Data.ContentReaction", "Reactions", b1 => + { + b1.Property("ContentId") + .HasColumnType("uuid"); + + b1.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b1.Property("Id")); + + b1.Property("Reaction") + .HasColumnType("integer"); + + b1.Property("UserId") + .HasColumnType("uuid"); + + b1.Property("UserName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b1.HasKey("ContentId", "Id"); + + b1.ToTable("Reactions", "Content"); + + b1.WithOwner() + .HasForeignKey("ContentId"); + }); + + b.Navigation("Creator"); + + b.Navigation("Reactions"); + }); + + modelBuilder.Entity("Hutopy.Web.Features.Contents.Data.Creator", b => + { + b.HasOne("Hutopy.Web.Features.Contents.Data.Slugs", "Slugs") + .WithMany() + .HasForeignKey("SlugsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.OwnsOne("Hutopy.Web.Features.Contents.Data.Images", "Images", b1 => + { + b1.Property("CreatorId") + .HasColumnType("uuid"); + + b1.Property("Banner") + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b1.Property("Logo") + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b1.HasKey("CreatorId"); + + b1.ToTable("Images", "Content"); + + b1.WithOwner() + .HasForeignKey("CreatorId"); + }); + + b.OwnsOne("Hutopy.Web.Features.Contents.Data.PresentationInfos", "PresentationInfos", b1 => + { + b1.Property("CreatorId") + .HasColumnType("uuid"); + + b1.Property("Email") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b1.Property("Image1Url") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b1.Property("Image2Url") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b1.Property("Image3Url") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b1.Property("Image4Url") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b1.Property("ImagesSubtitle") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("character varying(2000)"); + + b1.Property("ImagesText") + .IsRequired() + .HasMaxLength(10000) + .HasColumnType("character varying(10000)"); + + b1.Property("MainImageText") + .IsRequired() + .HasMaxLength(10000) + .HasColumnType("character varying(10000)"); + + b1.Property("MainImageUrl") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b1.Property("MainVideoText") + .IsRequired() + .HasMaxLength(10000) + .HasColumnType("character varying(10000)"); + + b1.Property("PhoneNumber") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b1.Property("Title") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("character varying(2000)"); + + b1.Property("VideoSubtitle") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("character varying(2000)"); + + b1.Property("VideoSubtitleMain") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("character varying(2000)"); + + b1.Property("VideoText") + .IsRequired() + .HasMaxLength(10000) + .HasColumnType("character varying(10000)"); + + b1.Property("VideoUrl") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b1.Property("VideoUrlMain") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("character varying(2000)"); + + b1.HasKey("CreatorId"); + + b1.ToTable("PresentationInfos", "Content"); + + b1.WithOwner() + .HasForeignKey("CreatorId"); + }); + + b.OwnsOne("Hutopy.Web.Features.Contents.Data.Socials", "Socials", b1 => + { + b1.Property("CreatorId") + .HasColumnType("uuid"); + + b1.Property("FacebookUrl") + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b1.Property("InstagramUrl") + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b1.Property("LinkedInUrl") + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b1.Property("RedditUrl") + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b1.Property("TikTokUrl") + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b1.Property("WebsiteUrl") + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b1.Property("XUrl") + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b1.Property("YoutubeUrl") + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b1.HasKey("CreatorId"); + + b1.ToTable("Socials", "Content"); + + b1.WithOwner() + .HasForeignKey("CreatorId"); + }); + + b.Navigation("Images") + .IsRequired(); + + b.Navigation("PresentationInfos") + .IsRequired(); + + b.Navigation("Slugs"); + + b.Navigation("Socials") + .IsRequired(); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/backend/src/Web/Features/Contents/Data/Migrations/20250402024746_EnsureUrlsAre1024Chars.cs b/backend/src/Web/Features/Contents/Data/Migrations/20250402024746_EnsureUrlsAre1024Chars.cs new file mode 100644 index 0000000..ea1058e --- /dev/null +++ b/backend/src/Web/Features/Contents/Data/Migrations/20250402024746_EnsureUrlsAre1024Chars.cs @@ -0,0 +1,390 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Hutopy.Web.Features.Contents.Data.Migrations +{ + /// + public partial class EnsureUrlsAre1024Chars : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "YoutubeUrl", + schema: "Content", + table: "Socials", + type: "character varying(1024)", + maxLength: 1024, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(255)", + oldMaxLength: 255, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "XUrl", + schema: "Content", + table: "Socials", + type: "character varying(1024)", + maxLength: 1024, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(255)", + oldMaxLength: 255, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "WebsiteUrl", + schema: "Content", + table: "Socials", + type: "character varying(1024)", + maxLength: 1024, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(255)", + oldMaxLength: 255, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "TikTokUrl", + schema: "Content", + table: "Socials", + type: "character varying(1024)", + maxLength: 1024, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(255)", + oldMaxLength: 255, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "RedditUrl", + schema: "Content", + table: "Socials", + type: "character varying(1024)", + maxLength: 1024, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(255)", + oldMaxLength: 255, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "LinkedInUrl", + schema: "Content", + table: "Socials", + type: "character varying(1024)", + maxLength: 1024, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(255)", + oldMaxLength: 255, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "InstagramUrl", + schema: "Content", + table: "Socials", + type: "character varying(1024)", + maxLength: 1024, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(255)", + oldMaxLength: 255, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "FacebookUrl", + schema: "Content", + table: "Socials", + type: "character varying(1024)", + maxLength: 1024, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(255)", + oldMaxLength: 255, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "VideoUrl", + schema: "Content", + table: "PresentationInfos", + type: "character varying(1024)", + maxLength: 1024, + nullable: false, + oldClrType: typeof(string), + oldType: "character varying(2000)", + oldMaxLength: 2000); + + migrationBuilder.AlterColumn( + name: "MainImageUrl", + schema: "Content", + table: "PresentationInfos", + type: "character varying(1024)", + maxLength: 1024, + nullable: false, + oldClrType: typeof(string), + oldType: "character varying(2000)", + oldMaxLength: 2000); + + migrationBuilder.AlterColumn( + name: "Image4Url", + schema: "Content", + table: "PresentationInfos", + type: "character varying(1024)", + maxLength: 1024, + nullable: false, + oldClrType: typeof(string), + oldType: "character varying(2000)", + oldMaxLength: 2000); + + migrationBuilder.AlterColumn( + name: "Image3Url", + schema: "Content", + table: "PresentationInfos", + type: "character varying(1024)", + maxLength: 1024, + nullable: false, + oldClrType: typeof(string), + oldType: "character varying(2000)", + oldMaxLength: 2000); + + migrationBuilder.AlterColumn( + name: "Image2Url", + schema: "Content", + table: "PresentationInfos", + type: "character varying(1024)", + maxLength: 1024, + nullable: false, + oldClrType: typeof(string), + oldType: "character varying(2000)", + oldMaxLength: 2000); + + migrationBuilder.AlterColumn( + name: "Image1Url", + schema: "Content", + table: "PresentationInfos", + type: "character varying(1024)", + maxLength: 1024, + nullable: false, + oldClrType: typeof(string), + oldType: "character varying(2000)", + oldMaxLength: 2000); + + migrationBuilder.AlterColumn( + name: "ThumbnailUrl", + schema: "Content", + table: "Contents", + type: "character varying(1024)", + maxLength: 1024, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(512)", + oldMaxLength: 512, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "HtmlFileUrl", + schema: "Content", + table: "Contents", + type: "character varying(1024)", + maxLength: 1024, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(2048)", + oldMaxLength: 2048, + oldNullable: true); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "YoutubeUrl", + schema: "Content", + table: "Socials", + type: "character varying(255)", + maxLength: 255, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(1024)", + oldMaxLength: 1024, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "XUrl", + schema: "Content", + table: "Socials", + type: "character varying(255)", + maxLength: 255, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(1024)", + oldMaxLength: 1024, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "WebsiteUrl", + schema: "Content", + table: "Socials", + type: "character varying(255)", + maxLength: 255, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(1024)", + oldMaxLength: 1024, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "TikTokUrl", + schema: "Content", + table: "Socials", + type: "character varying(255)", + maxLength: 255, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(1024)", + oldMaxLength: 1024, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "RedditUrl", + schema: "Content", + table: "Socials", + type: "character varying(255)", + maxLength: 255, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(1024)", + oldMaxLength: 1024, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "LinkedInUrl", + schema: "Content", + table: "Socials", + type: "character varying(255)", + maxLength: 255, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(1024)", + oldMaxLength: 1024, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "InstagramUrl", + schema: "Content", + table: "Socials", + type: "character varying(255)", + maxLength: 255, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(1024)", + oldMaxLength: 1024, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "FacebookUrl", + schema: "Content", + table: "Socials", + type: "character varying(255)", + maxLength: 255, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(1024)", + oldMaxLength: 1024, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "VideoUrl", + schema: "Content", + table: "PresentationInfos", + type: "character varying(2000)", + maxLength: 2000, + nullable: false, + oldClrType: typeof(string), + oldType: "character varying(1024)", + oldMaxLength: 1024); + + migrationBuilder.AlterColumn( + name: "MainImageUrl", + schema: "Content", + table: "PresentationInfos", + type: "character varying(2000)", + maxLength: 2000, + nullable: false, + oldClrType: typeof(string), + oldType: "character varying(1024)", + oldMaxLength: 1024); + + migrationBuilder.AlterColumn( + name: "Image4Url", + schema: "Content", + table: "PresentationInfos", + type: "character varying(2000)", + maxLength: 2000, + nullable: false, + oldClrType: typeof(string), + oldType: "character varying(1024)", + oldMaxLength: 1024); + + migrationBuilder.AlterColumn( + name: "Image3Url", + schema: "Content", + table: "PresentationInfos", + type: "character varying(2000)", + maxLength: 2000, + nullable: false, + oldClrType: typeof(string), + oldType: "character varying(1024)", + oldMaxLength: 1024); + + migrationBuilder.AlterColumn( + name: "Image2Url", + schema: "Content", + table: "PresentationInfos", + type: "character varying(2000)", + maxLength: 2000, + nullable: false, + oldClrType: typeof(string), + oldType: "character varying(1024)", + oldMaxLength: 1024); + + migrationBuilder.AlterColumn( + name: "Image1Url", + schema: "Content", + table: "PresentationInfos", + type: "character varying(2000)", + maxLength: 2000, + nullable: false, + oldClrType: typeof(string), + oldType: "character varying(1024)", + oldMaxLength: 1024); + + migrationBuilder.AlterColumn( + name: "ThumbnailUrl", + schema: "Content", + table: "Contents", + type: "character varying(512)", + maxLength: 512, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(1024)", + oldMaxLength: 1024, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "HtmlFileUrl", + schema: "Content", + table: "Contents", + type: "character varying(2048)", + maxLength: 2048, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(1024)", + oldMaxLength: 1024, + oldNullable: true); + } + } +} diff --git a/backend/src/Web/Features/Contents/Data/Migrations/ContentDbContextModelSnapshot.cs b/backend/src/Web/Features/Contents/Data/Migrations/ContentDbContextModelSnapshot.cs index 8300c68..65e2081 100644 --- a/backend/src/Web/Features/Contents/Data/Migrations/ContentDbContextModelSnapshot.cs +++ b/backend/src/Web/Features/Contents/Data/Migrations/ContentDbContextModelSnapshot.cs @@ -18,7 +18,7 @@ namespace Hutopy.Web.Features.Contents.Data.Migrations #pragma warning disable 612, 618 modelBuilder .HasDefaultSchema("Content") - .HasAnnotation("ProductVersion", "8.0.10") + .HasAnnotation("ProductVersion", "9.0.3") .HasAnnotation("Relational:MaxIdentifierLength", 63); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); @@ -49,19 +49,19 @@ namespace Hutopy.Web.Features.Contents.Data.Migrations .HasColumnType("character varying(2048)"); b.Property("HtmlFileUrl") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); b.Property("ThumbnailUrl") - .HasMaxLength(512) - .HasColumnType("character varying(512)"); + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); b.Property("Title") .IsRequired() .HasMaxLength(128) .HasColumnType("character varying(128)"); - b.Property("Urls") + b.PrimitiveCollection("Urls") .HasColumnType("text[]"); b.HasKey("Id"); @@ -225,23 +225,23 @@ namespace Hutopy.Web.Features.Contents.Data.Migrations b1.Property("Image1Url") .IsRequired() - .HasMaxLength(2000) - .HasColumnType("character varying(2000)"); + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); b1.Property("Image2Url") .IsRequired() - .HasMaxLength(2000) - .HasColumnType("character varying(2000)"); + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); b1.Property("Image3Url") .IsRequired() - .HasMaxLength(2000) - .HasColumnType("character varying(2000)"); + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); b1.Property("Image4Url") .IsRequired() - .HasMaxLength(2000) - .HasColumnType("character varying(2000)"); + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); b1.Property("ImagesSubtitle") .IsRequired() @@ -260,8 +260,8 @@ namespace Hutopy.Web.Features.Contents.Data.Migrations b1.Property("MainImageUrl") .IsRequired() - .HasMaxLength(2000) - .HasColumnType("character varying(2000)"); + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); b1.Property("MainVideoText") .IsRequired() @@ -295,8 +295,8 @@ namespace Hutopy.Web.Features.Contents.Data.Migrations b1.Property("VideoUrl") .IsRequired() - .HasMaxLength(2000) - .HasColumnType("character varying(2000)"); + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); b1.Property("VideoUrlMain") .IsRequired() @@ -317,36 +317,36 @@ namespace Hutopy.Web.Features.Contents.Data.Migrations .HasColumnType("uuid"); b1.Property("FacebookUrl") - .HasMaxLength(255) - .HasColumnType("character varying(255)"); + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); b1.Property("InstagramUrl") - .HasMaxLength(255) - .HasColumnType("character varying(255)"); + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); b1.Property("LinkedInUrl") - .HasMaxLength(255) - .HasColumnType("character varying(255)"); + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); b1.Property("RedditUrl") - .HasMaxLength(255) - .HasColumnType("character varying(255)"); + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); b1.Property("TikTokUrl") - .HasMaxLength(255) - .HasColumnType("character varying(255)"); + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); b1.Property("WebsiteUrl") - .HasMaxLength(255) - .HasColumnType("character varying(255)"); + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); b1.Property("XUrl") - .HasMaxLength(255) - .HasColumnType("character varying(255)"); + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); b1.Property("YoutubeUrl") - .HasMaxLength(255) - .HasColumnType("character varying(255)"); + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); b1.HasKey("CreatorId");