feat(db): migration for ElementDataType + widen attribute Value to nvarchar(max) (idempotent)
This commit is contained in:
+6
-2
@@ -99,8 +99,12 @@ public class InstanceAttributeOverrideConfiguration : IEntityTypeConfiguration<I
|
||||
.IsRequired()
|
||||
.HasMaxLength(200);
|
||||
|
||||
builder.Property(o => o.OverrideValue)
|
||||
.HasMaxLength(4000);
|
||||
// nvarchar(max): List attribute values (JSON arrays) can exceed 4000 chars.
|
||||
builder.Property(o => o.OverrideValue);
|
||||
|
||||
builder.Property(o => o.ElementDataType)
|
||||
.HasConversion<string>()
|
||||
.HasMaxLength(50);
|
||||
|
||||
builder.HasIndex(o => new { o.InstanceId, o.AttributeName }).IsUnique();
|
||||
}
|
||||
|
||||
+6
-2
@@ -108,8 +108,8 @@ public class TemplateAttributeConfiguration : IEntityTypeConfiguration<TemplateA
|
||||
.IsRequired()
|
||||
.HasMaxLength(200);
|
||||
|
||||
builder.Property(a => a.Value)
|
||||
.HasMaxLength(4000);
|
||||
// nvarchar(max): List attribute values (JSON arrays) can exceed 4000 chars.
|
||||
builder.Property(a => a.Value);
|
||||
|
||||
builder.Property(a => a.Description)
|
||||
.HasMaxLength(2000);
|
||||
@@ -121,6 +121,10 @@ public class TemplateAttributeConfiguration : IEntityTypeConfiguration<TemplateA
|
||||
.HasConversion<string>()
|
||||
.HasMaxLength(50);
|
||||
|
||||
builder.Property(a => a.ElementDataType)
|
||||
.HasConversion<string>()
|
||||
.HasMaxLength(50);
|
||||
|
||||
builder.HasIndex(a => new { a.TemplateId, a.Name }).IsUnique();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user