Jump to:

3373 Posts in 998 Topics by 712 members

Data Model Questions

SilverStripe Forums » Data Model Questions » Transactions And InnoDB

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

Page: 1
Go to End
Author Topic: 1254 Views
  • swaiba
    Avatar
    Forum Moderator
    1769 Posts

    Transactions And InnoDB Link to this post

    Hi,

    I am about to update all my DataObjects with the following...

    static $create_table_options = array('MySQLDatabase' => 'ENGINE=InnoDB');

    (After reading... http://www.silverstripe.org/archive/show/515#post515)

    This is because I need to run scripts on my database and the best way of doing that is with transactions in the first place... i.e.

    use test;
    BEGIN;
    SELECT count(*) FROM dummy;
    INSERT INTO dummy (ClassName) VALUES ('Dummy');
    SELECT count(*) FROM dummy;
    ROLLBACK;
    #COMMIT;

    Is there any disadvantage to change the table types to 'InnoDB'? Will I lose any silver stripe functionality?

    Barry

  • mark_s
    Avatar
    Community Member
    78 Posts

    Re: Transactions And InnoDB Link to this post

    Hi.

    The main feature you'll lose is full text search. If that is an issue for you, but you also can't do without transactions, you could consider using the sphinx module, which interfaces SilverStripe to sphinx search. Takes a little configuration, but works well once up and running.

    Mark

  • swaiba
    Avatar
    Forum Moderator
    1769 Posts

    Re: Transactions And InnoDB Link to this post

    Hi Mark,

    Thanks for that. I am unsure what full text search is - would I have something in my config to enable it?

    As long as I can still use the basic search - which I have customised to add in some data objects in Page.php to add in some dynamic pages based on data I am happy.

    function results($data, $form){
    ...
    }

    I've just looked at your sphinx module and it looks very nice - I was going to add searching PDFs soon, but this will do that and much more!

    Thanks again,

    Barry

    1254 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.