adding migration to retain functionality as it has always been in root when upgrading.

This commit is contained in:
Claus
2016-11-10 13:09:22 +01:00
parent 4f5bc9eb89
commit 9e24b694b3
2 changed files with 26 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
using Umbraco.Core.Configuration;
using Umbraco.Core.Logging;
using Umbraco.Core.Persistence.SqlSyntax;
namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSevenFiveFive
{
/// <summary>
/// See: http://issues.umbraco.org/issue/U4-4196
/// </summary>
[Migration("7.5.5", 1, GlobalSettings.UmbracoMigrationName)]
public class UpdateAllowedMediaTypesAtRoot : MigrationBase
{
public UpdateAllowedMediaTypesAtRoot(ISqlSyntaxProvider sqlSyntax, ILogger logger)
: base(sqlSyntax, logger)
{ }
public override void Up()
{
Execute.Sql("UPDATE cmsContentType SET allowAtRoot = 1 WHERE nodeId = 1031 OR nodeId = 1032 OR nodeId = 1033");
}
public override void Down()
{ }
}
}

View File

@@ -429,6 +429,7 @@
<Compile Include="Persistence\Mappers\MigrationEntryMapper.cs" />
<Compile Include="Persistence\Migrations\LocalMigrationContext.cs" />
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionFourOneZero\AddPreviewXmlTable.cs" />
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSevenFiveFive\UpdateAllowedMediaTypesAtRoot.cs" />
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSevenFiveZero\EnsureServersLockObject.cs" />
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSevenFiveZero\AddRedirectUrlTable.cs" />
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSevenFiveZero\RemoveStylesheetDataAndTablesAgain.cs" />