mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-10 17:28:27 -04:00
- .logignore now supports targeting channels and users
- .logignore now lists all ignored channels and users when no parameter is provided - Renamed and cleaned up some log-related fields
This commit is contained in:
@@ -42,8 +42,8 @@ namespace NadekoBot.Services.Database
|
||||
|
||||
//logging
|
||||
public DbSet<LogSetting> LogSettings { get; set; }
|
||||
public DbSet<IgnoredLogChannel> IgnoredLogChannels { get; set; }
|
||||
public DbSet<IgnoredVoicePresenceChannel> IgnoredVoicePresenceCHannels { get; set; }
|
||||
public DbSet<IgnoredLogItem> IgnoredLogChannels { get; set; }
|
||||
|
||||
public DbSet<RotatingPlayingStatus> RotatingStatus { get; set; }
|
||||
public DbSet<BlacklistEntry> Blacklist { get; set; }
|
||||
@@ -342,6 +342,15 @@ namespace NadekoBot.Services.Database
|
||||
modelBuilder.Entity<LogSetting>(ls => ls
|
||||
.HasIndex(x => x.GuildId)
|
||||
.IsUnique());
|
||||
|
||||
modelBuilder.Entity<LogSetting>(ls => ls
|
||||
.HasMany(x => x.LogIgnores)
|
||||
.WithOne(x => x.LogSetting)
|
||||
.OnDelete(DeleteBehavior.Cascade));
|
||||
|
||||
modelBuilder.Entity<IgnoredLogItem>(ili => ili
|
||||
.HasIndex(x => new { ItemId = x.LogItemId, x.ItemType })
|
||||
.IsUnique());
|
||||
|
||||
#endregion
|
||||
|
||||
|
Reference in New Issue
Block a user