Fix function

This commit is contained in:
DariusIII
2023-04-21 22:33:02 +02:00
parent 0bc777c9cf
commit 063df952cf
@@ -63,8 +63,8 @@ class NntmuxOptimizeTables extends Command
private function tableCheck($table): void
{
$this->info('Checking table: '.$table);
$tableCheck = \DB::statement('CHECK TABLE '.$table);
if ($tableCheck === 'error') {
$tableCheck = \DB::select('CHECK TABLE '.$table);
if ($tableCheck[0]->Msg_text !== 'Ok') {
$this->error('Table '.$table.' is corrupted. Please repair it.');
$this->info('Optimizing table: '.$table);
\DB::statement('OPTIMIZE TABLE '.$table);