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 System;
using Email.Data; using Email.Data;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
@@ -63,6 +63,7 @@ namespace Email.Data.Migrations
b.ToTable("Templates", "email"); 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; using Email.Data;
#nullable disable #nullable disable
@@ -22,7 +22,7 @@ namespace Email.Data.Migrations
migrationBuilder.InsertData( migrationBuilder.InsertData(
table: "Templates", table: "Templates",
columns: new[] { "Key", "Language", "Value", "Description" }, 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); schema: MigrationConstants.SchemaName);
} }