Ensure that the PartKeepr Version is correct.

This commit is contained in:
Jan Böhmer 2023-03-25 21:24:58 +01:00
parent 563d6bccd3
commit ae438f1650
2 changed files with 30 additions and 0 deletions

View file

@ -86,6 +86,12 @@ class ImportPartKeeprCommand extends Command
$xml = file_get_contents($input_path);
$data = $this->xml_converter->convertMySQLDumpXMLDataToArrayStructure($xml);
if (!$this->importHelper->checkVersion($data)) {
$db_version = $this->importHelper->getDatabaseSchemaVersion($data);
$io->error('The version of the imported database is not supported! (Version: '.$db_version.')');
return 1;
}
//Import the mandatory data
$this->doImport($io, $data);