Skip to content

Commit

Permalink
Disable Column Statistics for php artisan schema:dump on MariaDB (#…
Browse files Browse the repository at this point in the history
…43027)

Command fails on v10.x MariaDB.
  • Loading branch information
BrandonSurowiec committed Jul 1, 2022
1 parent 9ac0515 commit 33ef96e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Illuminate/Database/Schema/MySqlSchemaState.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ public function load($path)
*/
protected function baseDumpCommand()
{
$command = 'mysqldump '.$this->connectionString().' --no-tablespaces --skip-add-locks --skip-comments --skip-set-charset --tz-utc';
$command = 'mysqldump '.$this->connectionString().' --no-tablespaces --skip-add-locks --skip-comments --skip-set-charset --tz-utc --column-statistics=0';

if (! $this->connection->isMaria()) {
$command .= ' --column-statistics=0 --set-gtid-purged=OFF';
$command .= ' --set-gtid-purged=OFF';
}

return $command.' "${:LARAVEL_LOAD_DATABASE}"';
Expand Down

0 comments on commit 33ef96e

Please sign in to comment.