fix(email-data): replace hardcoded emailApi schema string with MigrationConstants
Down migration was referencing "emailApi" literal instead of MigrationConstants.SchemaName, which would have dropped the wrong schema on rollback. Also fix stale comment in DbContext. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -15,7 +15,7 @@ public sealed class EmailApiDbContext : DbContext
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||
{
|
||||
base.OnConfiguring(optionsBuilder);
|
||||
// Configure migration history table to use schema-qualified name: [emailApi].[_Migrations]
|
||||
// Configure migration history table to use schema-qualified name: [email].[_Migrations]
|
||||
optionsBuilder.UseSqlServer(x => x.MigrationsHistoryTable(MigrationTableName, SchemaName));
|
||||
}
|
||||
|
||||
|
||||
@@ -185,7 +185,7 @@ namespace Email.Data.Migrations
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(name: "EmailTemplates", schema: "emailApi");
|
||||
migrationBuilder.DropTable(name: "EmailTemplates", schema: MigrationConstants.SchemaName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user