Fix duplicate template seeding in email-api migrations
Build and Push Docker Images Staging / build (push) Successful in 2m34s

Remove Seed() call from CreateEmailTemplates Up() method to prevent
duplicate key violation when applying SeedEmailTemplates migration.

The original migration was attempting to seed data during schema creation,
but data seeding is now handled by the separate SeedEmailTemplates migration
(20260528130652). Keeping both Seed() calls caused PRIMARY KEY violation on
(email.html-shell.start, *) when the second migration tried to insert
already-existing templates.

This maintains the migration order: schema creation first, then data seeding
in a separate, dedicated migration.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-05-28 17:52:08 +03:00
parent 9d2c7af8eb
commit fc9e46d4dc
@@ -29,8 +29,6 @@ namespace EmailApi.Data.Migrations
{
table.PrimaryKey("PK_EmailTemplates", x => new { x.Key, x.Language });
});
Seed(migrationBuilder);
}
private static void Seed(MigrationBuilder m)