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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user