2. Update cmsContent (replace the old contentype with the new one)
Update cmsContent set contentType='OLDTYPEID' where contentType='NEWTYPEID'
3. Update cmsContentXml
SELECT cast(replace(cast([xml] as nvarchar(max)),'nodeType="OLDTYPEID"','nodeType="NEWTYPEID"') as ntext) FROM cmsContentXML INNER JOIN cmsContent ON cmsContentXML.nodeId = cmsContent.nodeId WHERE cmsContent.contentType='NEWTYPEID'
4. Update cmsPropertyData - map the properties of one the old type to the new one.
Select * FROM cmsPropertyData INNER JOIN cmsContent ON cmsPropertyData.contentNodeId = cmsContent.nodeId WHERE cmsContent.contentType='NEWTYPEID'
That will give you the properties, then you can write your own sql to update these.
Thanks for this I am going to give it a go shortly, I will be doing this on my local copy and couriering the changes to the live server, I am assuming everything should be ok with couriering the changes?
New Document Type
Hi, I am looking to change every page to a new document type, does anybody have an axample query to do this?
http://our.umbraco.org/forum/templating/templates-and-document-types/4585-Change-document-type
1. Back up your database.
2. Update cmsContent (replace the old contentype with the new one)
3. Update cmsContentXml
4. Update cmsPropertyData - map the properties of one the old type to the new one.
That will give you the properties, then you can write your own sql to update these.
Hope that helps.
Matt
Thanks for this I am going to give it a go shortly, I will be doing this on my local copy and couriering the changes to the live server, I am assuming everything should be ok with couriering the changes?
is working on a reply...