Created
March 4, 2014 09:21
-
-
Save henrikakselsen/9343044 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Implement of drush_hook_COMMAND_validate(). | |
* | |
* Prevent overwriting your prod db. | |
* Put this in your ~/.drush folder | |
*/ | |
function drush_policy_sql_sync_validate($source = NULL, $destination = NULL) { | |
if ($destination == '@prod') { | |
return drush_set_error(dt('Per examples/policy.drush.inc, you may never overwrite the production database.')); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment