Creating Events and News Items VIA SQL Insert Commands

Posted by Community Admin on 04-Aug-2018 01:00

Creating Events and News Items VIA SQL Insert Commands

All Replies

Posted by Community Admin on 06-Jun-2013 00:00

Hello Everyone,
I'm new to developing and don't have access to the Sitefinity API at the moment, but I do have write access to my Sitefinity SQL server.  I'm migrating from an old mssql based cms , and need to script over 300 events and 2000 stories.

Has anyone attempted to create news items and events from sql queries/inserts? I had a bit of success today trying this, but it just seems that all the unique identifiers are very hard to keep track of in the multiple tables.

From what I can tell, one news stories creates:
 2 entries in sf_news_items table
1 entry in sf_news_items_language_data
6 entries in sf_news_items_sf_permissions
 1 entry in sf_language data

..... and im sure i'm missing some. it seems a bit overkill compared to wordpress where you could get away with just importing the data into a single table.

Am I crazy for even attempting this? Has anyone had success doing this?

Dave

Posted by Community Admin on 06-Jun-2013 00:00

Hi Dave,

I don't assume you're crazy but I would strongly recommend to not even try this. Spend your time on getting API access instead. Messing with the tables is very risky, not documented, and you'll have a hard time getting support if you run into issues. I personally only touch the tables if something has been messed up and the API is unable to fix it.

I've not used WordPress but I don't think you can compare it to Sitefinity. The more options a CMS has to offer, the more complex the data store gets.

Posted by Community Admin on 10-Jun-2013 00:00

Hi,

Creating items by adding new rows in the database tables is not an option and it is not recommended. Directly modifying the database is also not supported. Currently you can import your data using the Sitefinity API. Regarding news items and events items you could review these sections in our documentation:

www.sitefinity.com/.../events

http://www.sitefinity.com/documentation/documentationarticles/developers-guide/sitefinity-essentials/modules/news

At the moment you have two options:
1. Create them manually in the backend of Sitefinity
2. Create/Import them programatically using Native or Fluent API.

Regards,
Stefani Tacheva
Telerik

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed