hook_drush_sql_sync_sanitize

7 drush.api.php hook_drush_sql_sync_sanitize($source)

Sql-sync sanitization example. This is equivalent to the built-in --sanitize option of sql-sync, but simplified to only work with default values on Drupal 6 + mysql.

See also

sql_drush_sql_sync_sanitize().

Related topics

1 function implements hook_drush_sql_sync_sanitize()

File

contributions/drush/docs/drush.api.php, line 261
Documentation of the Drush API.

Code

function hook_drush_sql_sync_sanitize($source) {
  drush_sql_register_post_sync_op('my-sanitize-id', 
    dt('Reset passwords and email addresses in user table'), 
    "update users set pass = MD5('password'), mail = concat('user+', uid, '@localhost') where uid > 0;");
}