From c38c18fed874758bd3d760d828396f390fc20d25 Mon Sep 17 00:00:00 2001 From: Morten Christensen Date: Thu, 28 Feb 2013 14:54:42 -0100 Subject: [PATCH] Adding migration for updating PropertyGroups and PropertyTypes --- src/Umbraco.Core/CoreBootManager.cs | 4 +++- src/Umbraco.Core/Models/ContentTypeCompositionBase.cs | 2 +- src/Umbraco.Core/Umbraco.Core.csproj | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Core/CoreBootManager.cs b/src/Umbraco.Core/CoreBootManager.cs index 534c523e15..a26a5b7b6d 100644 --- a/src/Umbraco.Core/CoreBootManager.cs +++ b/src/Umbraco.Core/CoreBootManager.cs @@ -9,6 +9,7 @@ using Umbraco.Core.Persistence; using Umbraco.Core.Persistence.Mappers; using Umbraco.Core.Persistence.Migrations; using Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSix; +using Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSixZeroOne; using Umbraco.Core.Persistence.UnitOfWork; using Umbraco.Core.PropertyEditors; using Umbraco.Core.Publishing; @@ -204,7 +205,8 @@ namespace Umbraco.Core typeof (UpdateCmsContentTypeAllowedContentTypeTable), typeof (UpdateCmsContentTypeTable), typeof (UpdateCmsContentVersionTable), - typeof (UpdateCmsPropertyTypeGroupTable) + typeof (UpdateCmsPropertyTypeGroupTable), + typeof (UpdatePropertyTypesAndGroups) }); PropertyEditorValueConvertersResolver.Current = new PropertyEditorValueConvertersResolver( diff --git a/src/Umbraco.Core/Models/ContentTypeCompositionBase.cs b/src/Umbraco.Core/Models/ContentTypeCompositionBase.cs index d7b91c038b..72c0a6f72a 100644 --- a/src/Umbraco.Core/Models/ContentTypeCompositionBase.cs +++ b/src/Umbraco.Core/Models/ContentTypeCompositionBase.cs @@ -178,7 +178,7 @@ namespace Umbraco.Core.Models if (CompositionPropertyGroups.Any(x => x.Name == propertyGroupName)) { var parentPropertyGroup = CompositionPropertyGroups.First(x => x.Name == propertyGroupName && x.ParentId.HasValue == false); - propertyGroup.SortOrder = parentPropertyGroup.SortOrder + 1; + propertyGroup.SortOrder = parentPropertyGroup.SortOrder; propertyGroup.ParentId = parentPropertyGroup.Id; } diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index 2af4f04820..d3c92bb8b5 100644 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -382,6 +382,7 @@ +