update migration process
This commit is contained in:
parent
1551ae6566
commit
4700546875
|
@ -349,17 +349,12 @@ namespace MediaBrowser.Server.Implementations.HttpServer
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(GlobalResponse))
|
if (!string.IsNullOrWhiteSpace(GlobalResponse))
|
||||||
{
|
|
||||||
if (string.Equals(GetExtension(urlString), "html", StringComparison.OrdinalIgnoreCase))
|
|
||||||
{
|
|
||||||
httpRes.Write(GlobalResponse);
|
|
||||||
httpRes.ContentType = "text/plain";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
httpRes.StatusCode = 503;
|
httpRes.StatusCode = 503;
|
||||||
}
|
httpRes.ContentType = "text/html";
|
||||||
|
httpRes.Write(GlobalResponse);
|
||||||
|
|
||||||
|
httpRes.Close();
|
||||||
return Task.FromResult(true);
|
return Task.FromResult(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -80,7 +80,7 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
||||||
|
|
||||||
private IDbCommand _updateInheritedRatingCommand;
|
private IDbCommand _updateInheritedRatingCommand;
|
||||||
|
|
||||||
private const int LatestSchemaVersion = 45;
|
private const int LatestSchemaVersion = 48;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="SqliteItemRepository"/> class.
|
/// Initializes a new instance of the <see cref="SqliteItemRepository"/> class.
|
||||||
|
|
|
@ -18,15 +18,21 @@ namespace MediaBrowser.Server.Startup.Common.Migrations
|
||||||
|
|
||||||
public void Run()
|
public void Run()
|
||||||
{
|
{
|
||||||
if (_config.Configuration.MigrationVersion < CleanDatabaseScheduledTask.MigrationVersion &&
|
if (_config.Configuration.MigrationVersion < CleanDatabaseScheduledTask.MigrationVersion)
|
||||||
_config.Configuration.IsStartupWizardCompleted)
|
|
||||||
{
|
{
|
||||||
|
if (!_config.Configuration.IsStartupWizardCompleted)
|
||||||
|
{
|
||||||
|
_config.Configuration.MigrationVersion = CleanDatabaseScheduledTask.MigrationVersion;
|
||||||
|
_config.SaveConfiguration();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
_taskManager.SuspendTriggers = true;
|
_taskManager.SuspendTriggers = true;
|
||||||
CleanDatabaseScheduledTask.EnableUnavailableMessage = true;
|
CleanDatabaseScheduledTask.EnableUnavailableMessage = true;
|
||||||
|
|
||||||
Task.Run(async () =>
|
Task.Run(async () =>
|
||||||
{
|
{
|
||||||
await Task.Delay(100).ConfigureAwait(false);
|
await Task.Delay(1000).ConfigureAwait(false);
|
||||||
|
|
||||||
_taskManager.Execute<CleanDatabaseScheduledTask>();
|
_taskManager.Execute<CleanDatabaseScheduledTask>();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue
Block a user