SQL: Bulk change doctype and template depending on current doctype
Hi all,
I am upgrading our blog from the original release to the latest. I have installed the latest blog package and now need to run a SQL script to make all of the old blog nodes use the new doctypes and templates.
I can change the doctypes it uses by changing the "contentType" column in the "cmsContent" table, but how do I go about changing the template too? Where and how is it stored in the database? Is there anything else I will need to update to get this working?
all of your blog posts should be in the published xml... i'd use that info and use cmsimport from Richard (find tool in project section) to import all of your blog posts again. it's that or writing your own import conversion tool (but i'd go with the first)
Changing doc type through database sql queries is asking for trouble imo.
Thanks for your reply. I have found that the template id is saved in cmsDocument table and for now I will see if changing it manually in the DB works. If it is too buggy I will revert to my backup and try the cmsImport idea and post on here how i get on.
You were right, lots of strange things started happening once I modified the database manually. The problem with cmsImport is that it dosn't maintain the year/month/day folder structure when you import. How would you recommendI over come this problem?
Hmm weird, my dirty work around was to import the files in a different folder, NOT using Datefolders. Then move the files to the correct blog folder and publish them. In my case the datefolders were created and files were stored in the correct folder. i did get lot of exceptions though because of errors in the event handler
SQL: Bulk change doctype and template depending on current doctype
Hi all,
I am upgrading our blog from the original release to the latest. I have installed the latest blog package and now need to run a SQL script to make all of the old blog nodes use the new doctypes and templates.
I can change the doctypes it uses by changing the "contentType" column in the "cmsContent" table, but how do I go about changing the template too? Where and how is it stored in the database? Is there anything else I will need to update to get this working?
Thanks,
Max.
all of your blog posts should be in the published xml... i'd use that info and use cmsimport from Richard (find tool in project section) to import all of your blog posts again. it's that or writing your own import conversion tool (but i'd go with the first)
Changing doc type through database sql queries is asking for trouble imo.
Cheers,
/Dirk
Hi,
Thanks for your reply. I have found that the template id is saved in cmsDocument table and for now I will see if changing it manually in the DB works. If it is too buggy I will revert to my backup and try the cmsImport idea and post on here how i get on.
Thanks,
Max.
You were right, lots of strange things started happening once I modified the database manually. The problem with cmsImport is that it dosn't maintain the year/month/day folder structure when you import. How would you recommendI over come this problem?
Hi Max,
I think when you map the date field against the post date property of Umbraco you are good, If not please let me know then I knwo a nasty work around.
Cheers,
Richard.
Unfortunately it didnt work, all the blog post nodes were put in the specified directory without date folders.
What was your work around?
Thanks.
Did you assign to the Post date property also?
Post date property as in "Publish At" in generic properties above?
No luck so far. Can I have your dirty work around please? :)
Hmm weird, my dirty work around was to import the files in a different folder, NOT using Datefolders. Then move the files to the correct blog folder and publish them. In my case the datefolders were created and files were stored in the correct folder. i did get lot of exceptions though because of errors in the event handler
Cheers,
Richard
is working on a reply...