Skip to content

Commit

Permalink
[8.x] Schema Dump: check error message with command option instead of…
Browse files Browse the repository at this point in the history
… table name (#34233)

* check error message with command option instead of table name

Command option: column-statistics
Table name :  column_statistics

* Update MySqlSchemaState.php

Co-authored-by: Taylor Otwell <taylor@laravel.com>
  • Loading branch information
roberto-butti and taylorotwell authored Sep 9, 2020
1 parent ca7e5d8 commit 1e3a8b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Database/Schema/MySqlSchemaState.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ protected function executeDumpProcess(Process $process, $output, array $variable
try {
$process->mustRun($output, $variables);
} catch (Exception $e) {
if (Str::contains($e->getMessage(), 'column_statistics')) {
if (Str::contains($e->getMessage(), ['column-statistics', 'column_statistics'])) {
return $this->executeDumpProcess(Process::fromShellCommandLine(
str_replace(' --column-statistics=0', '', $process->getCommandLine())
), $output, $variables);
Expand Down

0 comments on commit 1e3a8b7

Please sign in to comment.