deploy.provision.inc

  1. 7.x-3.x platform/deploy.provision.inc
  2. 7.x-3.x db/deploy.provision.inc
  3. 7.x-3.x http/deploy.provision.inc

Functions

File

db/deploy.provision.inc
View source
  1. <?php
  2. function drush_db_provision_deploy_validate() {
  3. d()->service('db')->connect();
  4. }
  5. function drush_db_pre_provision_deploy() {
  6. d()->service('db')->create_site_database();
  7. }
  8. function drush_db_pre_provision_deploy_rollback() {
  9. d()->service('db')->destroy_site_database();
  10. }
  11. function drush_db_provision_deploy() {
  12. d()->service('db')->import_site_database();
  13. }
  14. // Rollback doesn't apply here yet. Unless we trigger a deploy of the first dump
  15. // made. Which could go on infinitely if something is really long.
  16. function drush_db_post_provision_deploy() {
  17. provision_file()->unlink(d()->site_path . '/database.sql')
  18. ->succeed('Removed dump file @path after restoring from it')
  19. ->fail('Could not remove dump file @path', 'DRUSH_PERM_ERROR');
  20. }