Fix typo in comment and remove useless ones

pull/6522/head
Fernando Fernández 3 years ago
parent 154b7d8505
commit e5980f8686
No known key found for this signature in database
GPG Key ID: 44495B839CCFF8CF

@ -155,7 +155,7 @@ namespace Jellyfin.Server.Implementations
base.OnModelCreating(modelBuilder);
modelBuilder.HasDefaultSchema("jellyfin");
// Configuration for each entity is in it's own class inside 'ModelConfiguratio'.
// Configuration for each entity is in it's own class inside 'ModelConfiguration'.
modelBuilder.ApplyConfigurationsFromAssembly(typeof(JellyfinDb).Assembly);
}
}

@ -12,8 +12,6 @@ namespace Jellyfin.Server.Implementations.ModelConfiguration
/// <inheritdoc/>
public void Configure(EntityTypeBuilder<ApiKey> builder)
{
// Indexes
builder
.HasIndex(entity => entity.AccessToken)
.IsUnique();

@ -12,8 +12,6 @@ namespace Jellyfin.Server.Implementations.ModelConfiguration
/// <inheritdoc/>
public void Configure(EntityTypeBuilder<CustomItemDisplayPreferences> builder)
{
// Indexes
builder
.HasIndex(entity => new { entity.UserId, entity.ItemId, entity.Client, entity.Key })
.IsUnique();

@ -12,8 +12,6 @@ namespace Jellyfin.Server.Implementations.ModelConfiguration
/// <inheritdoc/>
public void Configure(EntityTypeBuilder<Device> builder)
{
// Indexes
builder
.HasIndex(entity => new { entity.DeviceId, entity.DateLastActivity });

@ -12,8 +12,6 @@ namespace Jellyfin.Server.Implementations.ModelConfiguration
/// <inheritdoc/>
public void Configure(EntityTypeBuilder<DeviceOptions> builder)
{
// Indexes
builder
.HasIndex(entity => entity.DeviceId)
.IsUnique();

@ -12,15 +12,11 @@ namespace Jellyfin.Server.Implementations.ModelConfiguration
/// <inheritdoc/>
public void Configure(EntityTypeBuilder<DisplayPreferences> builder)
{
// Delete behaviour
builder
.HasMany(d => d.HomeSections)
.WithOne()
.OnDelete(DeleteBehavior.Cascade);
// Indexes
builder
.HasIndex(entity => new { entity.UserId, entity.ItemId, entity.Client })
.IsUnique();

@ -12,8 +12,6 @@ namespace Jellyfin.Server.Implementations.ModelConfiguration
/// <inheritdoc/>
public void Configure(EntityTypeBuilder<Permission> builder)
{
// Indexes
// Used to get a user's permissions or a specific permission for a user.
// Also prevents multiple values being created for a user.
// Filtered over non-null user ids for when other entities (groups, API keys) get permissions

@ -12,8 +12,6 @@ namespace Jellyfin.Server.Implementations.ModelConfiguration
/// <inheritdoc/>
public void Configure(EntityTypeBuilder<Preference> builder)
{
// Indexes
builder
.HasIndex(p => new { p.UserId, p.Kind })
.HasFilter("[UserId] IS NOT NULL")

@ -12,14 +12,10 @@ namespace Jellyfin.Server.Implementations.ModelConfiguration
/// <inheritdoc/>
public void Configure(EntityTypeBuilder<User> builder)
{
// Collations
builder
.Property(user => user.Username)
.UseCollation("NOCASE");
// Delete behavior
builder
.HasOne(u => u.ProfileImage)
.WithOne()
@ -52,8 +48,6 @@ namespace Jellyfin.Server.Implementations.ModelConfiguration
.WithOne()
.OnDelete(DeleteBehavior.Cascade);
// Indexes
builder
.HasIndex(entity => entity.Username)
.IsUnique();

Loading…
Cancel
Save