pm_update.drush.inc

  1. 8.0.x examples/pm_update.drush.inc
  2. master examples/pm_update.drush.inc

Functions

File

examples/pm_update.drush.inc
View source
  1. <?php
  2. /**
  3. * Implements hook_pm_post_update().
  4. *
  5. * Restore sqlsrv driver after core update.
  6. */
  7. function pm_update_pm_post_update($project_name, $installed_release, $project) {
  8. // Restore sqlsrv database driver.
  9. if ($project_name == 'drupal') {
  10. $sqlsrv_dir = 'includes/database/sqlsrv';
  11. if (file_exists($project['backup_target'] . '/' . $sqlsrv_dir)) {
  12. if (drush_copy_dir($project['backup_target'] . '/' . $sqlsrv_dir, $project['full_project_path'] . '/' . $sqlsrv_dir)) {
  13. drush_log('SQLSRV database driver has been restored.', 'info');
  14. }
  15. }
  16. }
  17. }