fix(email-data): update migration files to use MigrationConstants.SchemaName
Fix schema name references in migration Designer.cs and ModelSnapshot files. Previously these files contained hardcoded 'emailApi' schema name instead of using MigrationConstants.SchemaName constant. This was causing EF Core to detect pending model changes and fail migrations. Changes: - 20260528100000_CreateEmailTemplates.Designer.cs: Use MigrationConstants.SchemaName - 20260528130652_SeedEmailTemplates.Designer.cs: Use MigrationConstants.SchemaName - EmailApiDbContextModelSnapshot.cs: Use MigrationConstants.SchemaName and updated namespace Also updated entity namespace references from EmailApi.Data to Email.Data. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
+3
-3
@@ -20,13 +20,13 @@ namespace Email.Data.Migrations
|
|||||||
{
|
{
|
||||||
#pragma warning disable 612, 618
|
#pragma warning disable 612, 618
|
||||||
modelBuilder
|
modelBuilder
|
||||||
.HasDefaultSchema("emailApi")
|
.HasDefaultSchema(MigrationConstants.SchemaName)
|
||||||
.HasAnnotation("ProductVersion", "10.0.7")
|
.HasAnnotation("ProductVersion", "10.0.7")
|
||||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||||
|
|
||||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
||||||
|
|
||||||
modelBuilder.Entity("EmailApi.Data.Entities.EmailTemplateEntity", b =>
|
modelBuilder.Entity("Email.Data.Entities.EmailTemplateEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("Key")
|
b.Property<string>("Key")
|
||||||
.HasMaxLength(128)
|
.HasMaxLength(128)
|
||||||
@@ -61,7 +61,7 @@ namespace Email.Data.Migrations
|
|||||||
|
|
||||||
b.HasKey("Key", "Language");
|
b.HasKey("Key", "Language");
|
||||||
|
|
||||||
b.ToTable("EmailTemplates", "emailApi");
|
b.ToTable("EmailTemplates", MigrationConstants.SchemaName);
|
||||||
});
|
});
|
||||||
#pragma warning restore 612, 618
|
#pragma warning restore 612, 618
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,13 +20,13 @@ namespace Email.Data.Migrations
|
|||||||
{
|
{
|
||||||
#pragma warning disable 612, 618
|
#pragma warning disable 612, 618
|
||||||
modelBuilder
|
modelBuilder
|
||||||
.HasDefaultSchema("emailApi")
|
.HasDefaultSchema(MigrationConstants.SchemaName)
|
||||||
.HasAnnotation("ProductVersion", "10.0.7")
|
.HasAnnotation("ProductVersion", "10.0.7")
|
||||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||||
|
|
||||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
||||||
|
|
||||||
modelBuilder.Entity("EmailApi.Data.Entities.EmailTemplateEntity", b =>
|
modelBuilder.Entity("Email.Data.Entities.EmailTemplateEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("Key")
|
b.Property<string>("Key")
|
||||||
.HasMaxLength(128)
|
.HasMaxLength(128)
|
||||||
@@ -61,7 +61,7 @@ namespace Email.Data.Migrations
|
|||||||
|
|
||||||
b.HasKey("Key", "Language");
|
b.HasKey("Key", "Language");
|
||||||
|
|
||||||
b.ToTable("EmailTemplates", "emailApi");
|
b.ToTable("EmailTemplates", MigrationConstants.SchemaName);
|
||||||
});
|
});
|
||||||
#pragma warning restore 612, 618
|
#pragma warning restore 612, 618
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,13 +17,13 @@ namespace Email.Data.Migrations
|
|||||||
{
|
{
|
||||||
#pragma warning disable 612, 618
|
#pragma warning disable 612, 618
|
||||||
modelBuilder
|
modelBuilder
|
||||||
.HasDefaultSchema("emailApi")
|
.HasDefaultSchema(MigrationConstants.SchemaName)
|
||||||
.HasAnnotation("ProductVersion", "10.0.7")
|
.HasAnnotation("ProductVersion", "10.0.7")
|
||||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||||
|
|
||||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
||||||
|
|
||||||
modelBuilder.Entity("EmailApi.Data.Entities.EmailTemplateEntity", b =>
|
modelBuilder.Entity("Email.Data.Entities.EmailTemplateEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("Key")
|
b.Property<string>("Key")
|
||||||
.HasMaxLength(128)
|
.HasMaxLength(128)
|
||||||
@@ -58,7 +58,7 @@ namespace Email.Data.Migrations
|
|||||||
|
|
||||||
b.HasKey("Key", "Language");
|
b.HasKey("Key", "Language");
|
||||||
|
|
||||||
b.ToTable("EmailTemplates", "emailApi");
|
b.ToTable("EmailTemplates", MigrationConstants.SchemaName);
|
||||||
});
|
});
|
||||||
#pragma warning restore 612, 618
|
#pragma warning restore 612, 618
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user