Why Clydesdale?
Expertise
Strategic Partners
Blog
Contact
Home
Clydesdale Software Logo

Clydesdale Software, Inc.

355 South Teller St.

Suite 200

Lakewood, CO 80226

info@ClydesdaleSoftware.com


Follow Us: Twitter RSS



Go Back

Sitefinity 4.0 Migration–Blog Posts

Anyone who has migrated from Sitefinity 3.7 to 4.0 and have had a blog has quickly realized all the post dates are wrong.  The correct dates are in the database but they are not the published dates you are seeing.

 

I wrote a quick sql script to correct this.  Run the script after publishing the posts to update the date to the date that should be displayed.

 

create table #temp
(
    content_id uniqueidentifier,
    publication_date datetime
)

insert into #temp
SELECT content_id, publication_date
FROM sf_blog_posts
WHERE content_state = 'PUBLISHED'

 

UPDATE sf_blog_posts
SET publication_date = #temp.publication_date
FROM sf_blog_posts
INNER JOIN #temp
ON #temp.content_id = sf_blog_posts.original_content_id
WHERE sf_blog_posts.original_content_id = #temp.content_id


drop table #temp

Facebook Twitter DZone It! Digg It! StumbleUpon Technorati Del.icio.us NewsVine Reddit Blinklist Add diigo bookmark