Skip to content

Commit

Permalink
Merge pull request #520 from herbdool/crm16541
Browse files Browse the repository at this point in the history
crm-16541 Allow extra options to be passed to mysqldump.
  • Loading branch information
jackrabbithanna authored Feb 10, 2018
2 parents 0af856a + 9ba43b4 commit 71121e0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drush/civicrm.drush.inc
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,14 @@ function civicrm_drush_command() {
'description' => 'Exports the CiviCRM DB as SQL using mysqldump.',
'examples' => array(
'drush civicrm-sql-dump --result-file=../CiviCRM.sql' => 'Save SQL dump to the directory above Drupal root.',
'drush civicrm-sql-dump --extra-options=--quick' => 'Pass the --quick option to mysqldump to help with large tables.',
),
'options' => array(
'data-only' => 'Dump data without statements to create any of the schema.',
'gzip' => 'Compress the dump using the gzip program which must be in your $PATH.',
'result-file' => 'Save to a file.',
'tables-list' => 'comma-separated list of tables to transfer.',
'extra-options' => 'Add custom options to the dump command.',
),
);
$items['civicrm-sql-query'] = array(
Expand Down Expand Up @@ -1177,6 +1179,8 @@ function drush_civicrm_pre_civicrm_sqldump() {
* Implementation of command 'civicrm-sql-dump'
*/
function drush_civicrm_sqldump() {
$extra_options = drush_get_option('extra-options', '');
drush_set_option('extra', '--routines ' . $extra_options);
if (version_compare(DRUSH_VERSION, 7, '>=')) {
drush_sql_dump();
}
Expand Down

0 comments on commit 71121e0

Please sign in to comment.