From e60f20a6a2b150eb7f717be9bb0745aac67ae41d Mon Sep 17 00:00:00 2001 From: Shannon Date: Tue, 10 Sep 2013 11:31:57 +1000 Subject: [PATCH] MIgration script updated to set any property editor that doesn't have a GUID-> alias map to a text box. --- .../Upgrades/TargetVersionSeven/ChangeControlIdColumn.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSeven/ChangeControlIdColumn.cs b/src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSeven/ChangeControlIdColumn.cs index b7806c43d7..2dee309029 100644 --- a/src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSeven/ChangeControlIdColumn.cs +++ b/src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSeven/ChangeControlIdColumn.cs @@ -31,12 +31,18 @@ namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSeven } else { + /* what do do ? * throw an exception? -> I can actually ensure that all GUIDs in the table currently have a valid entry in the map before running the upgrade and if not then the upgrade will just fail? * ignore it, just leave the legacy GUID entry in there -> this will mean that the editor will not render for that property and there will probably be YSODs generated elsewhere. * delete the entry -> of course this could lead to data loss * change it to a text field -> no data loss and they are able to then change it to a different property editor later in the data type editor */ + + //NOTE: I'm going to just set this to a text field, I think this is the 'safest' way without data loss and still allows an upgrade, still + // waiting on feedback from the core team. + + Update.Table("cmsDataType").Set(new { propertyEditorAlias = Constants.PropertyEditors.TextboxAlias }).Where(new { item.pk }); } } }