In my alias file I added default sanitize settings like here:

<?php
$aliases['localdev'] = array(
  'target-command-specific' => array(
    'sql-sync' => array(
      'sanitize' => TRUE,
      'confirm-sanitizations' => TRUE,
      'no-ordered-dump' => TRUE,
      'no-cache' => TRUE,
      'enable' => array(
        'devel',
        'stage_file_proxy',
        'views_ui',
      ),
    ),
  ),
);
?>

When I run a command like drush sql-sync @prod @local I get these messages:

You will destroy data in SITENAME and replace with data from SITENAME.

The following post-sync operations will be done on the destination:
* Reset passwords and email addresses in user table
* Truncate Drupal's sessions table

You might want to make a backup first, using the sql-dump command.
Do you really want to continue? (y/n): y

The following post-sync operations will be done on the destination:
* Reset passwords and email addresses in user table
* Truncate Drupal's sessions table

Do you really want to sanitize? (y/n): y

Comments

greg.1.anderson’s picture

Version: 7.x-5.8 » 8.x-6.x-dev
Status: Active » Closed (won't fix)
Issue tags: +Needs migration

This issue was marked closed (won't fix) because Drush has moved to Github.

If desired, you may copy this bug to our Github project and then post a link here to the new issue. Please also change the status of this issue to closed (duplicate).

Please ask support questions on Drupal Answers.