Skip to content

Commit

Permalink
Altered the drush database updates to be more simple.
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Malone committed Jan 21, 2014
1 parent 6d6646a commit 423b767
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions samples/domain_fix.sh 100644 → 100755
Expand Up @@ -19,10 +19,7 @@ $source = $argv[4];

// First ensure the domain module is installed. We do this by checking
// existence of the domain table in the appropriate database.
$domain = `(cat << EOF
SHOW TABLES LIKE 'domain';
EOF
) | drush @$site.$env ah-sql-cli --db=$db`;
$domain=`echo "SHOW TABLES LIKE 'domain'" | drush @$site.$env ah-sql-cli --db=$db"`;

if (!$domain) {
$returns[] = "Domain module not installed, aborting";
Expand Down Expand Up @@ -56,11 +53,7 @@ else {
if (isset($info[$env])) {
$to = $info[$env];
$returns[] = "Updating domain table to update $domain to $to";
`(cat << EOF
UPDATE domain SET subdomain = "$to" where machine_name = "$domain";
EOF
) | drush @$site.$env ah-sql-cli --db=$db`;

echo "UPDATE domain SET subdomain = "$to" where machine_name = "$domain" | drush @$site.$env ah-sql-cli --db=$db";
}
}
}
Expand Down

0 comments on commit 423b767

Please sign in to comment.