diff --git a/src/Orchard/Data/Migration/AutomaticDataMigrations.cs b/src/Orchard/Data/Migration/AutomaticDataMigrations.cs index 887e0a941..088903a06 100644 --- a/src/Orchard/Data/Migration/AutomaticDataMigrations.cs +++ b/src/Orchard/Data/Migration/AutomaticDataMigrations.cs @@ -38,8 +38,9 @@ namespace Orchard.Data.Migration { public ILogger Logger { get; set; } public void Activated() { + EnsureDistributedLockSchemaExists(); + IDistributedLock @lock; - EnsureDistributedLockSchema(); if(_distributedLockService.TryAcquireLock(GetType().FullName, TimeSpan.FromMinutes(30), TimeSpan.FromMilliseconds(250), out @lock)) { using (@lock) { // Let's make sure that the basic set of features is enabled. If there are any that are not enabled, then let's enable them first. @@ -72,7 +73,7 @@ namespace Orchard.Data.Migration { /// /// This ensures that the framework migrations have run for the distributed locking feature, as existing Orchard installations will not have the required tables when upgrading. /// - private void EnsureDistributedLockSchema() { + private void EnsureDistributedLockSchemaExists() { // Ensure the distributed lock record schema exists. var schemaBuilder = new SchemaBuilder(_dataMigrationInterpreter); var distributedLockSchemaBuilder = new DistributedLockSchemaBuilder(_shellSettings, schemaBuilder);