From e57e2f5b5f504d3706af7bccfc239d045c79b50a Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Thu, 28 Feb 2013 15:38:07 -0100 Subject: [PATCH] Migrations should be sorted by version number as well --- src/Umbraco.Core/Persistence/Migrations/MigrationRunner.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Core/Persistence/Migrations/MigrationRunner.cs b/src/Umbraco.Core/Persistence/Migrations/MigrationRunner.cs index 2eb5896374..ad5fcdebc5 100644 --- a/src/Umbraco.Core/Persistence/Migrations/MigrationRunner.cs +++ b/src/Umbraco.Core/Persistence/Migrations/MigrationRunner.cs @@ -105,7 +105,7 @@ namespace Umbraco.Core.Persistence.Migrations migrationAttribute.TargetVersion > _configuredVersion && migrationAttribute.TargetVersion <= _targetVersion && migrationAttribute.ProductName == _productName - orderby migrationAttribute.SortOrder ascending + orderby migrationAttribute.TargetVersion, migrationAttribute.SortOrder ascending select migration); return migrations; } @@ -119,7 +119,8 @@ namespace Umbraco.Core.Persistence.Migrations migrationAttribute.TargetVersion > _configuredVersion && migrationAttribute.TargetVersion <= _targetVersion && migrationAttribute.ProductName == _productName - orderby migrationAttribute.SortOrder descending + orderby migrationAttribute.TargetVersion, migrationAttribute.SortOrder descending + select migration); return migrations; }