From 47005468752c3d981635cecce71d8c24c2d9df55 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 14 Feb 2016 23:46:51 -0500 Subject: update migration process --- MediaBrowser.Server.Startup.Common/Migrations/DbMigration.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'MediaBrowser.Server.Startup.Common') diff --git a/MediaBrowser.Server.Startup.Common/Migrations/DbMigration.cs b/MediaBrowser.Server.Startup.Common/Migrations/DbMigration.cs index 3cd92bcde..65517c09c 100644 --- a/MediaBrowser.Server.Startup.Common/Migrations/DbMigration.cs +++ b/MediaBrowser.Server.Startup.Common/Migrations/DbMigration.cs @@ -18,15 +18,21 @@ namespace MediaBrowser.Server.Startup.Common.Migrations public void Run() { - if (_config.Configuration.MigrationVersion < CleanDatabaseScheduledTask.MigrationVersion && - _config.Configuration.IsStartupWizardCompleted) + if (_config.Configuration.MigrationVersion < CleanDatabaseScheduledTask.MigrationVersion) { + if (!_config.Configuration.IsStartupWizardCompleted) + { + _config.Configuration.MigrationVersion = CleanDatabaseScheduledTask.MigrationVersion; + _config.SaveConfiguration(); + return; + } + _taskManager.SuspendTriggers = true; CleanDatabaseScheduledTask.EnableUnavailableMessage = true; Task.Run(async () => { - await Task.Delay(100).ConfigureAwait(false); + await Task.Delay(1000).ConfigureAwait(false); _taskManager.Execute(); }); -- cgit v1.2.3