aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJPVenson <github@jpb.email>2025-06-10 14:31:01 +0000
committerJPVenson <github@jpb.email>2025-06-10 14:31:01 +0000
commit91da1c035d7b8ee8c7456d62f52dd9e63b5fc59e (patch)
tree74a5a520ea1172a21b041a892b5564bf4958e299
parent6b5ce934b3ad522cc73b702538026ec7c99103cd (diff)
Fix schema name on backup
-rw-r--r--Jellyfin.Server.Implementations/FullSystemBackup/BackupService.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Jellyfin.Server.Implementations/FullSystemBackup/BackupService.cs b/Jellyfin.Server.Implementations/FullSystemBackup/BackupService.cs
index e266d5a3b..ad8f5f337 100644
--- a/Jellyfin.Server.Implementations/FullSystemBackup/BackupService.cs
+++ b/Jellyfin.Server.Implementations/FullSystemBackup/BackupService.cs
@@ -297,7 +297,7 @@ public class BackupService : IBackupService
.GetProperties(System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance)
.Where(e => e.PropertyType.IsAssignableTo(typeof(IQueryable)))
.Select(e => (Type: e.PropertyType, ValueFactory: new Func<IAsyncEnumerable<object>>(() => GetValues((IQueryable)e.GetValue(dbContext)!, e.PropertyType)))),
- (Type: typeof(HistoryRow), ValueFactory: new Func<IAsyncEnumerable<object>>(() => migrations.ToAsyncEnumerable()))
+ (Type: typeof(IQueryable<HistoryRow>), ValueFactory: new Func<IAsyncEnumerable<object>>(() => migrations.ToAsyncEnumerable()))
];
manifest.DatabaseTables = entityTypes.Select(e => e.Type.Name).ToArray();
var transaction = await dbContext.Database.BeginTransactionAsync().ConfigureAwait(false);
@@ -308,6 +308,7 @@ public class BackupService : IBackupService
foreach (var entityType in entityTypes)
{
+ var schemaName = dbContext.Model.FindEntityType(entityType.Type.GetGenericArguments()[0])!.GetSchemaQualifiedTableName()!;
_logger.LogInformation("Begin backup of entity {Table}", entityType.Type.Name);
var zipEntry = zipArchive.CreateEntry($"Database\\{entityType.Type.Name}.json");
var entities = 0;