diff --git a/README.md b/README.md index f7874f6..328b207 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,12 @@ php artisan vendor:publish --provider="BackupManager\Laravel\Laravel5ServiceProv The Backup Manager will make use of Laravel's database configuration. But, it won't know about any connections that might be tied to other environments, so it can be best to just list multiple connections in the `config/database.php` file. +We can also add extra parameters on our backup manager commands by configuring extra params on `.env` file: + +``` +BACKUP_MANAGER_EXTRA_PARAMS="--column-statistics=0 --max-allowed-packet" +``` + #### Lumen Configuration To install into a Lumen project, first do the composer install then add the configuration file loader and *ONE* of the following service providers to your `bootstrap/app.php`. diff --git a/config/backup-manager.php b/config/backup-manager.php index 3811221..c06df12 100644 --- a/config/backup-manager.php +++ b/config/backup-manager.php @@ -58,4 +58,7 @@ 'privateKey' => '', 'root' => '', ], + + // Add additional options to dump-command (like '--max-allowed-packet') + 'command-extra-params' => env('BACKUP_MANAGER_EXTRA_PARAMS'), ]; diff --git a/src/GetDatabaseConfig.php b/src/GetDatabaseConfig.php index 6320b88..dd0eb77 100644 --- a/src/GetDatabaseConfig.php +++ b/src/GetDatabaseConfig.php @@ -38,8 +38,7 @@ private function getDatabaseConfig($connections) { 'database' => $connection['database'], 'ignoreTables' => $connection['driver'] === 'mysql' && isset($connection['ignoreTables']) ? $connection['ignoreTables'] : null, - // add additional options to dump-command (like '--max-allowed-packet') - 'extraParams' => '--column-statistics=0', + 'extraParams' => config('backup-manager.command-extra-params'), ]; }, $connections); return new Config($mapped);