Skip to content

Commit

Permalink
CLI-842: Restore single-db imports for IDE (#1159)
Browse files Browse the repository at this point in the history
  • Loading branch information
danepowell authored Sep 2, 2022
1 parent aab469c commit 8f222ad
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Command/Pull/PullCommandBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -1063,6 +1063,11 @@ private function importRemoteDatabase(stdClass $database, string $local_filepath
$this->io->note("Acquia CLI assumes that the database name for the {$database->name} database is also {$database->name}");
$this->doImportRemoteDatabase($this->getDefaultLocalDbHost(), 'root', $database->name, '', $local_filepath, $output_callback);
}
elseif (AcquiaDrupalEnvironmentDetector::isAhIdeEnv() && !getenv('IDE_ENABLE_MULTISITE')) {
// Cloud IDE only has 2 available databases for importing, so we only allow importing into the default database.
$this->io->note("Cloud IDE only supports importing into the default Drupal database. Acquia CLI will import the NON-DEFAULT database {$database->name} into the DEFAULT database {$this->getDefaultLocalDbName()}");
$this->doImportRemoteDatabase($this->getDefaultLocalDbHost(), $this->getDefaultLocalDbUser(), $this->getDefaultLocalDbName(), $this->getDefaultLocalDbPassword(), $local_filepath, $output_callback);
}
else {
$this->io->note("Acquia CLI assumes that the local database name for the {$database->name} database is also {$database->name}");
$this->doImportRemoteDatabase($this->getDefaultLocalDbHost(), $this->getDefaultLocalDbUser(), $database->name, $this->getDefaultLocalDbPassword(), $local_filepath, $output_callback);
Expand Down

0 comments on commit 8f222ad

Please sign in to comment.