Adding migration for updating PropertyGroups and PropertyTypes

This commit is contained in:
Morten Christensen
2013-02-28 14:54:42 -01:00
parent 0af47963c6
commit c38c18fed8
3 changed files with 5 additions and 2 deletions

View File

@@ -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(

View File

@@ -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;
}

View File

@@ -382,6 +382,7 @@
<Compile Include="Persistence\Migrations\Syntax\Update\UpdateBuilder.cs" />
<Compile Include="Persistence\Migrations\Syntax\Update\UpdateDataBuilder.cs" />
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionFourNineZero\RemoveUmbracoAppConstraints.cs" />
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSixZeroOne\UpdatePropertyTypesAndGroups.cs" />
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSix\DeleteAppTables.cs" />
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSix\EnsureAppsTreesUpdated.cs" />
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSix\MoveMasterContentTypeData.cs" />