$output->writeln('<error>Unknown object store configuration: '.$source.'</error>');
return1;
}
if($source==='root'){
$output->writeln('<error>Renaming the root configuration is not supported.</error>');
return1;
}
if($source==='default'){
$output->writeln('<error>Renaming the default configuration is not supported.</error>');
return1;
}
if(!isset($configs[$target])){
$output->writeln('<comment>Target object store configuration '.$target.' doesn\'t exist yet.</comment>');
$output->writeln('The target configuration can be created automatically.');
$output->writeln('However, as this depends on modifying the config.php, this only works as long as the instance runs on a single node or all nodes in a clustered setup have a shared config file (such as from a shared network mount).');
$output->writeln('If the different nodes have a separate copy of the config.php file, the automatic object store configuration creation will lead to the configuration going out of sync.');
$output->writeln('If these requirements are not met, you can manually create the target object store configuration in each node\'s configuration before running the command.');
$output->writeln('');
$output->writeln('<error>Failure to check these requirements will lead to data loss for users.</error>');
/** @var QuestionHelper $helper */
$helper=$this->getHelper('question');
$question=newConfirmationQuestion('Automatically create target object store configuration? [y/N] ',false);
$output->writeln('<error>Source and target configuration differ.</error>');
$output->writeln('');
$output->writeln('To ensure proper migration of users, the source and target configuration must be the same to ensure that the objects for the moved users exist on the target configuration.');
$output->writeln('The usual migration process consists of creating a clone of the old configuration, moving the users from the old configuration to the new one, and then adjust the old configuration that is longer used.');