Skip to content

Commit

Permalink
Match mongo/SQL export structure
Browse files Browse the repository at this point in the history
  • Loading branch information
pjcdawkins committed Jul 23, 2019
1 parent d0a74c9 commit 20945f2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Command/Archive/ArchiveExportCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
class ArchiveExportCommand extends CommandBase
{
// @todo refactor this
const ARCHIVE_VERSION = 3; // increment this when BC-breaking changes are introduced
const ARCHIVE_VERSION = 4; // increment this when BC-breaking changes are introduced

/**
* {@inheritdoc}
Expand Down Expand Up @@ -293,7 +293,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
}
(new Filesystem())->dumpFile($filename, $buffer->fetch());
$metadata['services'][$serviceName]['_type'] = $type;
$metadata['services'][$serviceName] += [
$metadata['services'][$serviceName]['dumps'][] = [
'filename' => 'services/' . $serviceName . '/' . $filename,
'app' => $appName,
'relationship' => $relationshipName,
Expand Down
5 changes: 4 additions & 1 deletion src/Command/Archive/ArchiveImportCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,10 @@ protected function execute(InputInterface $input, OutputInterface $output)
} elseif ($serviceInfo['_type'] === 'mongodb') {
$this->stdErr->writeln('');
$this->stdErr->writeln('Importing data for service <info>' . $serviceName . '</info>');
$this->importMongoDump($archiveDir, $serviceInfo);

foreach ($serviceInfo['dumps'] as $dumpInfo) {
$this->importMongoDump($archiveDir, $dumpInfo);
}
}
}
}
Expand Down

0 comments on commit 20945f2

Please sign in to comment.