Merge branch 'temp8' into feature/IContentType-removale-from-IContent
This commit is contained in:
@@ -10,21 +10,20 @@
|
||||
/// </summary>
|
||||
public UpdateMemberGroupPickerData(IMigrationContext context)
|
||||
: base(context)
|
||||
{
|
||||
}
|
||||
{ }
|
||||
|
||||
public override void Migrate()
|
||||
{
|
||||
Database.Execute($@"UPDATE cmsPropertyData SET dataNtext = dataNvarchar, dataNvarchar = NULL
|
||||
WHERE dataNtext IS NULL AND id IN (
|
||||
SELECT id FROM cmsPropertyData WHERE propertyTypeId in (
|
||||
SELECT id from cmsPropertyType where dataTypeID IN (
|
||||
SELECT nodeId FROM cmsDataType WHERE propertyEditorAlias = '{Constants.PropertyEditors.Aliases.MemberGroupPicker}'
|
||||
Database.Execute($@"UPDATE umbracoPropertyData SET textValue = varcharValue, varcharValue = NULL
|
||||
WHERE textValue IS NULL AND id IN (
|
||||
SELECT id FROM umbracoPropertyData WHERE propertyTypeId in (
|
||||
SELECT id from cmsPropertyType where dataTypeId IN (
|
||||
SELECT nodeId FROM umbracoDataType WHERE propertyEditorAlias = '{Constants.PropertyEditors.Aliases.MemberGroupPicker}'
|
||||
)
|
||||
)
|
||||
)");
|
||||
|
||||
Database.Execute($"UPDATE cmsDataType SET dbType = 'Ntext' WHERE propertyEditorAlias = '{Constants.PropertyEditors.Aliases.MemberGroupPicker}'");
|
||||
Database.Execute($"UPDATE umbracoDataType SET dbType = 'Ntext' WHERE propertyEditorAlias = '{Constants.PropertyEditors.Aliases.MemberGroupPicker}'");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ namespace Umbraco.Core.Models.PublishedContent
|
||||
var typeName = attribute == null ? type.Name : attribute.ContentTypeAlias;
|
||||
|
||||
if (modelInfos.TryGetValue(typeName, out var modelInfo))
|
||||
throw new InvalidOperationException($"Both types {type.FullName} and {modelInfo.ModelType.FullName} want to be a model type for content type with alias \"{typeName}\".");
|
||||
throw new InvalidOperationException($"Both types '{type.AssemblyQualifiedName}' and '{modelInfo.ModelType.AssemblyQualifiedName}' want to be a model type for content type with alias \"{typeName}\".");
|
||||
|
||||
// have to use an unsafe ctor because we don't know the types, really
|
||||
var modelCtor = ReflectionUtilities.EmitConstructorUnsafe<Func<object, object>>(constructor);
|
||||
|
||||
Reference in New Issue
Block a user