db optimizations around names and case-sensitivity (#2749)

* generate (case-insensitive) unique names for fields that should be unique

* move name case-insensitivity down to schema level

* update changelog
This commit is contained in:
Jason Dove
2026-01-02 09:25:23 -06:00
committed by GitHub
parent 80f6e468eb
commit bcd2ea7db3
79 changed files with 29898 additions and 360 deletions
@@ -51,9 +51,7 @@ public class ChannelRepository(IDbContextFactory<TvContext> dbContextFactory) :
List<ChannelWatermark> maybeWatermarks = await dbContext.ChannelWatermarks
.AsNoTracking()
.Where(cw => EF.Functions.Like(
EF.Functions.Collate(cw.Name, TvContext.CaseInsensitiveCollation),
$"%{name}%"))
.Where(cw => EF.Functions.Like(cw.Name, $"%{name}%"))
.ToListAsync();
return maybeWatermarks.HeadOrNone();