Jump to:

23374 Posts in 18175 Topics by 2866 members

General Questions

SilverStripe Forums » General Questions » SQL Migration Documentation

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 732 Views
  • Ben Gribaudo
    Avatar
    Community Member
    181 Posts

    SQL Migration Documentation Link to this post

    Hello,

    We have a mid-sized site we'd like to migrate from a home-grown CMS to SS. It might save some effort if we could automate the bulk of this migration. One way to do this would using SQL to insert pages in SS's database. Is there any documentation out there on how to do this (such as "how to create new SS pages via SQL")?

    Thanks!
    Ben

  • Willr
    Avatar
    Forum Moderator
    5489 Posts

    Re: SQL Migration Documentation Link to this post

    To create a page in the cms have alook at the 'SiteTree' and 'SiteTree_Live' tables.

    I think you would be able to get it to work by doing something like 'INSERT INTO SiteTree (Title, Content, URLSegment, ParentID....) VALUES ('My Page', 'My Content', 'page-url', 0)

    It would involve just a bit of trial and error and playing round . I think you will be able to just insert into sitetree and then run publish/all rather then insert into 2 tables.

    Also another way that might be useful is andy has developed a static importer for one of our clients sites, imports a couple thousand pages from a think a CSV file export of their database. You might like to check out the code for that - http://open.silverstripe.com/browser/modules/staticimporter/trunk

  • Ben Gribaudo
    Avatar
    Community Member
    181 Posts

    Re: SQL Migration Documentation Link to this post

    Thanks for these pointers, Will!

    732 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.