diff options
Diffstat (limited to 'src/Jellyfin.Database/Jellyfin.Database.Implementations/IJellyfinDatabaseProvider.cs')
| -rw-r--r-- | src/Jellyfin.Database/Jellyfin.Database.Implementations/IJellyfinDatabaseProvider.cs | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/IJellyfinDatabaseProvider.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/IJellyfinDatabaseProvider.cs index 566b521dd..6b35810b2 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/IJellyfinDatabaseProvider.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/IJellyfinDatabaseProvider.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using Microsoft.EntityFrameworkCore; @@ -50,7 +51,7 @@ public interface IJellyfinDatabaseProvider /// <summary> /// Runs a full Database backup that can later be restored to. /// </summary> - /// <param name="cancellationToken">A cancelation token.</param> + /// <param name="cancellationToken">A cancellation token.</param> /// <returns>A key to identify the backup.</returns> /// <exception cref="NotImplementedException">May throw an NotImplementException if this operation is not supported for this database.</exception> Task<string> MigrationBackupFast(CancellationToken cancellationToken); @@ -59,7 +60,22 @@ public interface IJellyfinDatabaseProvider /// Restores a backup that has been previously created by <see cref="MigrationBackupFast(CancellationToken)"/>. /// </summary> /// <param name="key">The key to the backup from which the current database should be restored from.</param> - /// <param name="cancellationToken">A cancelation token.</param> + /// <param name="cancellationToken">A cancellation token.</param> /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns> Task RestoreBackupFast(string key, CancellationToken cancellationToken); + + /// <summary> + /// Deletes a backup that has been previously created by <see cref="MigrationBackupFast(CancellationToken)"/>. + /// </summary> + /// <param name="key">The key to the backup which should be cleaned up.</param> + /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns> + Task DeleteBackup(string key); + + /// <summary> + /// Removes all contents from the database. + /// </summary> + /// <param name="dbContext">The Database context.</param> + /// <param name="tableNames">The names of the tables to purge or null for all tables to be purged.</param> + /// <returns>A Task.</returns> + Task PurgeDatabase(JellyfinDbContext dbContext, IEnumerable<string>? tableNames); } |
