From f9530b168f2b2a617c5183023bb814ba4641d569 Mon Sep 17 00:00:00 2001 From: claude Date: Mon, 1 Jun 2026 18:37:26 +0300 Subject: [PATCH] Restore AddHtmlShellTemplates migration with copyright symbol fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Restored email.html-shell.start and email.html-shell.end templates to InitialSchema migration - Fixed copyright symbol: changed © to © HTML entity (avoids encoding issues in database) - These templates wrap plain text email bodies in proper HTML structure - Migration runs after InitialSchema, seeding the HTML wrapper templates Co-Authored-By: Claude Haiku 4.5 --- ...01145256_AddHtmlShellTemplates.Designer.cs | 65 ++++++++++--------- .../20260601145256_AddHtmlShellTemplates.cs | 6 +- 2 files changed, 36 insertions(+), 35 deletions(-) diff --git a/Apis/email-data/Migrations/20260601145256_AddHtmlShellTemplates.Designer.cs b/Apis/email-data/Migrations/20260601145256_AddHtmlShellTemplates.Designer.cs index ef4508b..99112d4 100644 --- a/Apis/email-data/Migrations/20260601145256_AddHtmlShellTemplates.Designer.cs +++ b/Apis/email-data/Migrations/20260601145256_AddHtmlShellTemplates.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using Email.Data; using Microsoft.EntityFrameworkCore; @@ -18,7 +18,7 @@ namespace Email.Data.Migrations /// protected override void BuildTargetModel(ModelBuilder modelBuilder) { -#pragma warning disable 612, 618 + #pragma warning disable 612, 618 modelBuilder .HasDefaultSchema("email") .HasAnnotation("ProductVersion", "10.0.7") @@ -27,43 +27,44 @@ namespace Email.Data.Migrations SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); modelBuilder.Entity("Email.Data.Entities.EmailTemplateEntity", b => - { - b.Property("Key") - .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + { + b.Property("Key") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); - b.Property("Language") - .HasMaxLength(8) - .HasColumnType("nvarchar(8)"); + b.Property("Language") + .HasMaxLength(8) + .HasColumnType("nvarchar(8)"); - b.Property("Description") - .IsRequired() - .ValueGeneratedOnAdd() - .HasMaxLength(500) - .HasColumnType("nvarchar(500)") - .HasDefaultValue(""); + b.Property("Description") + .IsRequired() + .ValueGeneratedOnAdd() + .HasMaxLength(500) + .HasColumnType("nvarchar(500)") + .HasDefaultValue(""); - b.Property("OperatorCopy") - .IsRequired() - .ValueGeneratedOnAdd() - .HasMaxLength(256) - .HasColumnType("nvarchar(256)") - .HasDefaultValue(""); + b.Property("OperatorCopy") + .IsRequired() + .ValueGeneratedOnAdd() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasDefaultValue(""); - b.Property("UpdatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("datetime2") - .HasDefaultValueSql("SYSUTCDATETIME()"); + b.Property("UpdatedAt") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasDefaultValueSql("SYSUTCDATETIME()"); - b.Property("Value") - .IsRequired() - .HasColumnType("nvarchar(max)"); + b.Property("Value") + .IsRequired() + .HasColumnType("nvarchar(max)"); - b.HasKey("Key", "Language"); + b.HasKey("Key", "Language"); - b.ToTable("Templates", "email"); - }); -#pragma warning restore 612, 618 + b.ToTable("Templates", "email"); + }); + + #pragma warning restore 612, 618 } } } diff --git a/Apis/email-data/Migrations/20260601145256_AddHtmlShellTemplates.cs b/Apis/email-data/Migrations/20260601145256_AddHtmlShellTemplates.cs index 6376b45..4fc5703 100644 --- a/Apis/email-data/Migrations/20260601145256_AddHtmlShellTemplates.cs +++ b/Apis/email-data/Migrations/20260601145256_AddHtmlShellTemplates.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; using Email.Data; #nullable disable @@ -15,14 +15,14 @@ namespace Email.Data.Migrations migrationBuilder.InsertData( table: "Templates", columns: new[] { "Key", "Language", "Value", "Description" }, - values: new object[] { "email.html-shell.start", "*", "\n\n\n \n \n \n\n\n
\n
\n

MyAi.ro

\n
\n
\n", "Opening HTML wrapper for branded emails (blue header, white content area)" }, + values: new object[] { "email.html-shell.start", "*", "\n\n\n \n \n \n\n\n
\n
\n

MyAi.ro

\n
\n
\n", "Opening HTML wrapper for branded emails (blue header, white content area)" }, schema: MigrationConstants.SchemaName); // HTML email shell — closing tags (footer) migrationBuilder.InsertData( table: "Templates", columns: new[] { "Key", "Language", "Value", "Description" }, - values: new object[] { "email.html-shell.end", "*", "
\n
\n

© 2026 MyAi.ro. All rights reserved.

\n
\n
\n\n\n", "Closing HTML wrapper for branded emails (footer and closing tags)" }, + values: new object[] { "email.html-shell.end", "*", "
\n
\n

© 2026 MyAi.ro. All rights reserved.

\n
\n
\n\n\n", "Closing HTML wrapper for branded emails (footer and closing tags)" }, schema: MigrationConstants.SchemaName); }