More in this section

Forums / Developing with Sitefinity / Creating Events and News Items VIA SQL Insert Commands

Creating Events and News Items VIA SQL Insert Commands

3 posts, 0 answered
  1. David
    David avatar
    9 posts
    05 Jun 2013
    06 Jun 2013
    Link to this post
    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?

  2. Arno
    Arno avatar
    249 posts
    08 Sep 2010
    06 Jun 2013 in reply to David
    Link to this post
    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.
  3. Stefani Tacheva
    Stefani Tacheva avatar
    718 posts
    31 May 2017
    10 Jun 2013
    Link to this post

    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:

    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.

    Stefani Tacheva
    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
3 posts, 0 answered