diff --git a/Jellyfin.Server/Migrations/IMigrationRoutine.cs b/Jellyfin.Server/Migrations/IMigrationRoutine.cs index 6b5780a26..c1000eede 100644 --- a/Jellyfin.Server/Migrations/IMigrationRoutine.cs +++ b/Jellyfin.Server/Migrations/IMigrationRoutine.cs @@ -17,6 +17,11 @@ namespace Jellyfin.Server.Migrations /// public string Name { get; } + /// + /// Gets a value indicating whether to perform migration on a new install. + /// + public bool PerformOnNewInstall { get; } + /// /// Execute the migration routine. /// diff --git a/Jellyfin.Server/Migrations/MigrationRunner.cs b/Jellyfin.Server/Migrations/MigrationRunner.cs index d633c554d..fe8910c3c 100644 --- a/Jellyfin.Server/Migrations/MigrationRunner.cs +++ b/Jellyfin.Server/Migrations/MigrationRunner.cs @@ -43,9 +43,8 @@ namespace Jellyfin.Server.Migrations // If startup wizard is not finished, this is a fresh install. // Don't run any migrations, just mark all of them as applied. logger.LogInformation("Marking all known migrations as applied because this is a fresh install"); - migrationOptions.Applied.AddRange(migrations.Select(m => (m.Id, m.Name))); + migrationOptions.Applied.AddRange(migrations.Where(m => !m.PerformOnNewInstall).Select(m => (m.Id, m.Name))); host.ServerConfigurationManager.SaveConfiguration(MigrationsListStore.StoreKey, migrationOptions); - return; } var appliedMigrationIds = migrationOptions.Applied.Select(m => m.Id).ToHashSet(); diff --git a/Jellyfin.Server/Migrations/Routines/AddDefaultPluginRepository.cs b/Jellyfin.Server/Migrations/Routines/AddDefaultPluginRepository.cs index a9d5ad16a..f6d8c9cc0 100644 --- a/Jellyfin.Server/Migrations/Routines/AddDefaultPluginRepository.cs +++ b/Jellyfin.Server/Migrations/Routines/AddDefaultPluginRepository.cs @@ -32,6 +32,9 @@ namespace Jellyfin.Server.Migrations.Routines /// public string Name => "AddDefaultPluginRepository"; + /// + public bool PerformOnNewInstall => true; + /// public void Perform() { diff --git a/Jellyfin.Server/Migrations/Routines/CreateUserLoggingConfigFile.cs b/Jellyfin.Server/Migrations/Routines/CreateUserLoggingConfigFile.cs index b15e09290..6821630db 100644 --- a/Jellyfin.Server/Migrations/Routines/CreateUserLoggingConfigFile.cs +++ b/Jellyfin.Server/Migrations/Routines/CreateUserLoggingConfigFile.cs @@ -48,6 +48,9 @@ namespace Jellyfin.Server.Migrations.Routines /// public string Name => "CreateLoggingConfigHeirarchy"; + /// + public bool PerformOnNewInstall => false; + /// public void Perform() { diff --git a/Jellyfin.Server/Migrations/Routines/DisableTranscodingThrottling.cs b/Jellyfin.Server/Migrations/Routines/DisableTranscodingThrottling.cs index c18aa1629..0925a87b5 100644 --- a/Jellyfin.Server/Migrations/Routines/DisableTranscodingThrottling.cs +++ b/Jellyfin.Server/Migrations/Routines/DisableTranscodingThrottling.cs @@ -25,6 +25,9 @@ namespace Jellyfin.Server.Migrations.Routines /// public string Name => "DisableTranscodingThrottling"; + /// + public bool PerformOnNewInstall => false; + /// public void Perform() { diff --git a/Jellyfin.Server/Migrations/Routines/MigrateActivityLogDb.cs b/Jellyfin.Server/Migrations/Routines/MigrateActivityLogDb.cs index fb3466e13..6048160c6 100644 --- a/Jellyfin.Server/Migrations/Routines/MigrateActivityLogDb.cs +++ b/Jellyfin.Server/Migrations/Routines/MigrateActivityLogDb.cs @@ -41,6 +41,9 @@ namespace Jellyfin.Server.Migrations.Routines /// public string Name => "MigrateActivityLogDatabase"; + /// + public bool PerformOnNewInstall => false; + /// public void Perform() { diff --git a/Jellyfin.Server/Migrations/Routines/MigrateUserDb.cs b/Jellyfin.Server/Migrations/Routines/MigrateUserDb.cs index 2be10c708..274e6ab73 100644 --- a/Jellyfin.Server/Migrations/Routines/MigrateUserDb.cs +++ b/Jellyfin.Server/Migrations/Routines/MigrateUserDb.cs @@ -54,6 +54,9 @@ namespace Jellyfin.Server.Migrations.Routines /// public string Name => "MigrateUserDatabase"; + /// + public bool PerformOnNewInstall => false; + /// public void Perform() { diff --git a/Jellyfin.Server/Migrations/Routines/RemoveDuplicateExtras.cs b/Jellyfin.Server/Migrations/Routines/RemoveDuplicateExtras.cs index 2ebef0241..6c26e47e1 100644 --- a/Jellyfin.Server/Migrations/Routines/RemoveDuplicateExtras.cs +++ b/Jellyfin.Server/Migrations/Routines/RemoveDuplicateExtras.cs @@ -29,6 +29,9 @@ namespace Jellyfin.Server.Migrations.Routines /// public string Name => "RemoveDuplicateExtras"; + /// + public bool PerformOnNewInstall => false; + /// public void Perform() {