181a0b23b5
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>
70 lines
2.4 KiB
C#
70 lines
2.4 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using Email.Data;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Metadata;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
|
|
#nullable disable
|
|
|
|
namespace Email.Data.Migrations
|
|
{
|
|
[DbContext(typeof(EmailApiDbContext))]
|
|
[Migration("20260528100000_CreateEmailTemplates")]
|
|
partial class CreateEmailTemplates
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder
|
|
.HasDefaultSchema(MigrationConstants.SchemaName)
|
|
.HasAnnotation("ProductVersion", "10.0.7")
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
|
|
|
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
|
|
|
modelBuilder.Entity("Email.Data.Entities.EmailTemplateEntity", b =>
|
|
{
|
|
b.Property<string>("Key")
|
|
.HasMaxLength(128)
|
|
.HasColumnType("nvarchar(128)");
|
|
|
|
b.Property<string>("Language")
|
|
.HasMaxLength(8)
|
|
.HasColumnType("nvarchar(8)");
|
|
|
|
b.Property<string>("Description")
|
|
.IsRequired()
|
|
.ValueGeneratedOnAdd()
|
|
.HasMaxLength(500)
|
|
.HasColumnType("nvarchar(500)")
|
|
.HasDefaultValue("");
|
|
|
|
b.Property<string>("OperatorCopy")
|
|
.IsRequired()
|
|
.ValueGeneratedOnAdd()
|
|
.HasMaxLength(256)
|
|
.HasColumnType("nvarchar(256)")
|
|
.HasDefaultValue("");
|
|
|
|
b.Property<DateTime>("UpdatedAt")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("datetime2")
|
|
.HasDefaultValueSql("SYSUTCDATETIME()");
|
|
|
|
b.Property<string>("Value")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Key", "Language");
|
|
|
|
b.ToTable("EmailTemplates", MigrationConstants.SchemaName);
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|