/[drupal]/contributions/modules/provision/db_server/deploy.provision.inc
ViewVC logotype

Contents of /contributions/modules/provision/db_server/deploy.provision.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.7 - (show annotations) (download) (as text)
Wed Aug 26 01:00:28 2009 UTC (3 months ago) by anarcat
Branch: MAIN
CVS Tags: DRUPAL-6--0-3, DRUPAL-6--0-4-ALPHA1, DRUPAL-6--0-4-ALPHA3, DRUPAL-6--0-4-ALPHA2, HEAD
Changes since 1.6: +1 -1 lines
File MIME type: text/x-php
silence some warnings
1 <?php
2
3 function drush_provision_mysql_provision_deploy_validate() {
4 provision_db_connect();
5 }
6
7 function drush_provision_mysql_provision_deploy($url) {
8 $db_type = drush_set_option('db_type', drush_get_option('db_type'), 'site');
9 $db_host = drush_set_option('db_host', drush_get_option('db_host'), 'site');
10 $db_passwd = drush_set_option('db_passwd', provision_password(), 'site');
11 $db_name = drush_set_option('db_name', _provision_mysql_suggest_db_name($url), 'site');
12 $db_user = drush_set_option('db_user', $db_name, 'site');
13
14 _provision_mysql_new_site_db($db_name, $db_user, $db_passwd);
15
16 _provision_mysql_import_dump(
17 drush_get_option('sites_path') .'/'. $url .'/database.sql',
18 $db_name, $db_user, $db_passwd, $db_host );
19 }
20
21
22 function drush_provision_mysql_provision_deploy_rollback($url = NULL) {
23 _provision_mysql_destroy_site_db(drush_get_option('db_name'), drush_get_option('db_user'), drush_get_option('db_passwd'));
24 }
25
26 // Rollback doesn't apply here yet. Unless we trigger a deploy of the first dump
27 // made. Which could go on infinitely if something is really long.
28 function drush_provision_mysql_post_provision_deploy($url = NULL) {
29 provision_path('unlink', drush_get_option('sites_path') .'/'. $url .'/database.sql', TRUE,
30 dt("Removed dump file @path after restoring from it"),
31 dt("Could not remove dump file @path"), 'DRUSH_PERM_ERROR');
32 }

  ViewVC Help
Powered by ViewVC 1.1.2