Restore AddHtmlShellTemplates migration with copyright symbol fix

- 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 <noreply@anthropic.com>
This commit is contained in:
2026-06-01 18:37:26 +03:00
parent 9cb38e5bc8
commit f9530b168f
2 changed files with 36 additions and 35 deletions
@@ -1,4 +1,4 @@
// <auto-generated />
// <auto-generated />
using System;
using Email.Data;
using Microsoft.EntityFrameworkCore;
@@ -18,7 +18,7 @@ namespace Email.Data.Migrations
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
#pragma warning disable 612, 618
modelBuilder
.HasDefaultSchema("email")
.HasAnnotation("ProductVersion", "10.0.7")
@@ -63,7 +63,8 @@ namespace Email.Data.Migrations
b.ToTable("Templates", "email");
});
#pragma warning restore 612, 618
#pragma warning restore 612, 618
}
}
}
@@ -1,4 +1,4 @@
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Migrations;
using Email.Data;
#nullable disable
@@ -22,7 +22,7 @@ namespace Email.Data.Migrations
migrationBuilder.InsertData(
table: "Templates",
columns: new[] { "Key", "Language", "Value", "Description" },
values: new object[] { "email.html-shell.end", "*", " </div>\n <div class=\"email-footer\">\n <p>© 2026 MyAi.ro. All rights reserved.</p>\n </div>\n </div>\n</body>\n</html>\n", "Closing HTML wrapper for branded emails (footer and closing tags)" },
values: new object[] { "email.html-shell.end", "*", " </div>\n <div class=\"email-footer\">\n <p>&copy; 2026 MyAi.ro. All rights reserved.</p>\n </div>\n </div>\n</body>\n</html>\n", "Closing HTML wrapper for branded emails (footer and closing tags)" },
schema: MigrationConstants.SchemaName);
}