Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Implement of drush_hook_COMMAND_validate().
- *
- * Prevent catastrophic braino. Note that this file has to be local to the machine
- * that intitiates sql-sync command.
- */
- 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.'));
- }
- }
- <?php
- /**
- * Implementation of drush_hook_COMMAND_validate().
- */
- function drush_policy_sql_sync_validate($source = NULL, $destination = NULL) {
- if ($destination == '@prod') {
- return drush_set_error(dt('Permission denied! You almost overwrote the production database you moron!'));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement