Skip to content

Commit

Permalink
Get rid of ROW_FORMAT=COMPACT
Browse files Browse the repository at this point in the history
  • Loading branch information
remdex committed Jan 27, 2022
1 parent 1f93e67 commit bcabf54
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -303,6 +303,7 @@ public function createArchive()
$command = $rows[1];
$command = preg_replace('/AUTO_INCREMENT\=[0-9]+/i', 'AUTO_INCREMENT=1', $command);
$command = str_replace("`lh_chat`", "`lh_chat_archive_{$this->id}`", $command);
$command = str_replace("ROW_FORMAT=COMPACT", "", $command);
$db->query($command);

// Create archive msg table
Expand All @@ -312,6 +313,7 @@ public function createArchive()
$command = $rows[1];
$command = preg_replace('/AUTO_INCREMENT\=[0-9]+/i', 'AUTO_INCREMENT=1', $command);
$command = str_replace("`lh_msg`", "`lh_chat_archive_msg_{$this->id}`", $command);
$command = str_replace("ROW_FORMAT=COMPACT", "", $command);
$db->query($command);

// Create group chat member table
Expand All @@ -321,6 +323,7 @@ public function createArchive()
$command = $rows[1];
$command = preg_replace('/AUTO_INCREMENT\=[0-9]+/i', 'AUTO_INCREMENT=1', $command);
$command = str_replace("`lh_group_chat_member`", "`lh_group_chat_member_{$this->id}`", $command);
$command = str_replace("ROW_FORMAT=COMPACT", "", $command);
$db->query($command);

// Create a group chat table
Expand All @@ -330,6 +333,7 @@ public function createArchive()
$command = $rows[1];
$command = preg_replace('/AUTO_INCREMENT\=[0-9]+/i', 'AUTO_INCREMENT=1', $command);
$command = str_replace("`lh_group_chat`", "`lh_group_chat_{$this->id}`", $command);
$command = str_replace("ROW_FORMAT=COMPACT", "", $command);
$db->query($command);

// Create group chat messages table
Expand All @@ -339,6 +343,7 @@ public function createArchive()
$command = $rows[1];
$command = preg_replace('/AUTO_INCREMENT\=[0-9]+/i', 'AUTO_INCREMENT=1', $command);
$command = str_replace("`lh_group_msg`", "`lh_group_msg_{$this->id}`", $command);
$command = str_replace("ROW_FORMAT=COMPACT", "", $command);
$db->query($command);

$stmt = $db->prepare('SHOW CREATE TABLE `lh_chat_action`;');
Expand All @@ -347,6 +352,7 @@ public function createArchive()
$command = $rows[1];
$command = preg_replace('/AUTO_INCREMENT\=[0-9]+/i', 'AUTO_INCREMENT=1', $command);
$command = str_replace("`lh_chat_action`", "`lh_chat_action_{$this->id}`", $command);
$command = str_replace("ROW_FORMAT=COMPACT", "", $command);
$db->query($command);
}

Expand Down

0 comments on commit bcabf54

Please sign in to comment.