perf(db): add IsUnicode(false) on ASCII-only code/identifier columns

Added IsUnicode(false) to hostname, version, status, IP, hash,
prefix, key, URL, timezone, theme, language, YOLO model name,
and enum-based string columns. These columns only contain ASCII
data — disabling Unicode improves PostgreSQL index efficiency
and reduces storage.

Excluded natural text columns (Address, DisplayName, Site.Name)
that may contain Unicode characters like accented letters.
This commit is contained in:
Arnaud Dartois committed 2026-07-17 19:31:11 +00:00
1 parent c36978d5a1
commit b04d8a72c2
8 files changed
+52 -26

No files matched your search

@@ -14,17 +14,21 @@ public class CameraCredentialsConfiguration : IEntityTypeConfiguration<CameraCre
builder.Property(c => c.OnvifUsername)
.HasMaxLength(100)
.HasDefaultValue("admin");
.HasDefaultValue("admin")
.IsUnicode(false);
builder.Property(c => c.OnvifPassword)
.HasMaxLength(500)
.IsRequired();
.IsRequired()
.IsUnicode(false);
builder.Property(c => c.RtspUsername)
.HasMaxLength(100);
.HasMaxLength(100)
.IsUnicode(false);
builder.Property(c => c.RtspPassword)
.HasMaxLength(500);
.HasMaxLength(500)
.IsUnicode(false);
builder.Property(c => c.CreatedAt)
.HasDefaultValueSql("NOW()");