Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

Why does Silverstripe hardwire its storage engine to MyISAM?


Go to End


2 Posts   3907 Views

Avatar
julian

Community Member, 17 Posts

11 March 2007 at 11:13pm

... just curious as it seems like InnoDB is much better all round.

Silverstripe 2.0.0, MySQLDatabase.php:

/**
* Create a new table with an integer primary key called ID.
*/
public function createTable($tableName) {
$this->query("CREATE TABLE `$tableName` (ID int(11) not null auto_increment, primary key (ID)) TYPE=MyISAM");
}

thanks,
J

Avatar
Sam

Administrator, 690 Posts

12 March 2007 at 4:12pm

We hardwired the storage engine so that database generation was done automatically.

It would be fairly straight forward to add a static method, so that you could put this into your _config.php file:
* MySQLDatabase::table_type("InnoDB")

As to why we chose MyISAM, we basically went with it because we didn't need the extra features of InnoDB, and we though we'd go with the format with the most history. This may change in future releases as we might want to use transactions.