mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-23 02:09:03 +02:00
Ensure that the PartKeepr Version is correct.
This commit is contained in:
parent
563d6bccd3
commit
ae438f1650
2 changed files with 30 additions and 0 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue