Merge pull request #5419 from kjac/v8-fix-convert-media-urls-migration
V8: Fix duplicate alias exception in "convert media URLs" migration
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using Newtonsoft.Json;
|
||||
@@ -26,9 +26,8 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_1_0
|
||||
RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace);
|
||||
|
||||
var sqlPropertyData = Sql()
|
||||
.Select<PropertyDataDto>()
|
||||
.AndSelect<PropertyTypeDto>()
|
||||
.AndSelect<DataTypeDto>()
|
||||
.Select<PropertyDataDto>(x => x.Id, x => x.TextValue)
|
||||
.AndSelect<DataTypeDto>(x => x.EditorAlias)
|
||||
.From<PropertyDataDto>()
|
||||
.InnerJoin<PropertyTypeDto>().On<PropertyDataDto, PropertyTypeDto>((left, right) => left.PropertyTypeId == right.Id)
|
||||
.InnerJoin<DataTypeDto>().On<PropertyTypeDto, DataTypeDto>((left, right) => left.DataTypeId == right.NodeId)
|
||||
@@ -64,7 +63,7 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_1_0
|
||||
property.TextValue = UpdateMediaUrls(mediaLinkPattern, value);
|
||||
}
|
||||
|
||||
Database.Update(property);
|
||||
Database.Update(property, x => x.TextValue);
|
||||
}
|
||||
|
||||
Context.AddPostMigration<RebuildPublishedSnapshot>();
|
||||
|
||||
Reference in New Issue
Block a user