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:
1 parent
c36978d5a1
commit
b04d8a72c2
8 files changed
+52
-26
No files matched your search
@@ -17,11 +17,13 @@ public class AppUserConfiguration : IEntityTypeConfiguration<AppUser>
|
||||
|
||||
builder.Property(u => u.Theme)
|
||||
.HasMaxLength(20)
|
||||
.HasDefaultValue("Auto");
|
||||
.HasDefaultValue("Auto")
|
||||
.IsUnicode(false);
|
||||
|
||||
builder.Property(u => u.Language)
|
||||
.HasMaxLength(10)
|
||||
.HasDefaultValue("fr");
|
||||
.HasDefaultValue("fr")
|
||||
.IsUnicode(false);
|
||||
|
||||
builder.Property(u => u.CreatedAt)
|
||||
.HasDefaultValueSql("NOW()");
|
||||
|
||||
Reference in new issue
Block a user