Advertisement
Guest User

Untitled

a guest
Oct 30th, 2014
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. /**
  2. * Implement of drush_hook_COMMAND_validate().
  3. *
  4. * Prevent catastrophic braino. Note that this file has to be local to the machine
  5. * that intitiates sql-sync command.
  6. */
  7. function drush_policy_sql_sync_validate($source = NULL, $destination = NULL) {
  8. if ($destination == '@prod') {
  9. return drush_set_error(dt('Per examples/policy.drush.inc, you may never overwrite the production database.'));
  10. }
  11. }
  12.  
  13. <?php
  14. /**
  15. * Implementation of drush_hook_COMMAND_validate().
  16. */
  17. function drush_policy_sql_sync_validate($source = NULL, $destination = NULL) {
  18. if ($destination == '@prod') {
  19. return drush_set_error(dt('Permission denied! You almost overwrote the production database you moron!'));
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement