Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Morning all! Hope everyone is safe and well.
I've noticed that a data type record gets created in the cmsDataType table only once it is used for the first time.
The reason I noticed this is that we run migrations via the api for creating properties on nodes.
The issue we've found is that then when trying to migrate test and live the record doesn't exist until we manually add the data type to a property on a node but this creates inconsistent Id's so if we want to refer to the data type record by id it is inconsistent and fails migrations.
I was wondering:
How to do this successfully as I've tried to look up the property type id based on the data type name eg "Umbraco.MultipleTextstring" eg:
var property = new PropertyType("Umbraco.MultipleTextstring", DataTypeDatabaseType.Ntext)
Alias = propertyAlias,
Name = propertyName,
Mandatory = mandatory,
Description = description
Would it just be better to execute raw sql?
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted