Skip to content

Commit 33ef96e

Browse files
Disable Column Statistics for php artisan schema:dump on MariaDB (#43027)
Command fails on v10.x MariaDB.
1 parent 9ac0515 commit 33ef96e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Illuminate/Database/Schema/MySqlSchemaState.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,10 @@ public function load($path)
8585
*/
8686
protected function baseDumpCommand()
8787
{
88-
$command = 'mysqldump '.$this->connectionString().' --no-tablespaces --skip-add-locks --skip-comments --skip-set-charset --tz-utc';
88+
$command = 'mysqldump '.$this->connectionString().' --no-tablespaces --skip-add-locks --skip-comments --skip-set-charset --tz-utc --column-statistics=0';
8989

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

9494
return $command.' "${:LARAVEL_LOAD_DATABASE}"';

0 commit comments

Comments
 (0)