forked from leftypol/leftypol
Use MyISAM instead of InnoDB
This commit is contained in:
parent
aa02cffb93
commit
ecd02144da
3 changed files with 27 additions and 14 deletions
15
install.php
15
install.php
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
// Installation/upgrade file
|
||||
define('VERSION', 'v0.9.3-dev-6');
|
||||
define('VERSION', 'v0.9.3-dev-7');
|
||||
|
||||
require 'inc/functions.php';
|
||||
require 'inc/display.php';
|
||||
|
@ -91,6 +91,19 @@
|
|||
// Increase subject field size
|
||||
query(sprintf("ALTER TABLE `posts_%s` CHANGE `subject` `subject` VARCHAR( 100 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL", $_board['uri'])) or error(db_error());
|
||||
}
|
||||
case 'v0.9.3-dev-6':
|
||||
// change to MyISAM
|
||||
$tables = Array(
|
||||
'bans', 'boards', 'ip_notes', 'modlogs', 'mods', 'mutes', 'noticeboard', 'pms', 'reports', 'robot', 'theme_settings', 'news'
|
||||
);
|
||||
$boards = listBoards();
|
||||
foreach($boards as &$board) {
|
||||
$tables[] = "posts_{$board['uri']}";
|
||||
}
|
||||
|
||||
foreach($tables as &$table) {
|
||||
query("ALTER TABLE `{$table}` ENGINE = MYISAM DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci");
|
||||
}
|
||||
case false:
|
||||
// Update version number
|
||||
file_write($config['has_installed'], VERSION);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue