adapt to review

This commit is contained in:
Torsten Dittmann 2022-09-14 09:12:17 +02:00
parent 4260d01bb9
commit 5e5ca0ba16
2 changed files with 8 additions and 6 deletions

View file

@ -41,7 +41,8 @@ abstract class Migration
* @var array
*/
public static array $versions = [
'1.0.0-RC1' => 'V15'
'1.0.0-RC1' => 'V15',
'1.0.0' => 'V15'
];
/**
@ -123,10 +124,6 @@ abstract class Migration
} catch (\Throwable $th) {
Console::error('Failed to update document: ' . $th->getMessage());
return;
if ($document && $new->getId() !== $document->getId()) {
throw new Exception('Duplication Error');
}
}
}, $document, $callback);
}

View file

@ -732,7 +732,12 @@ class V15 extends Migration
Console::log("Migrating Collection \"{$id}\" Variables");
foreach ($this->documentsIterator($id) as $function) {
foreach ($function->getAttribute('vars', []) as $key => $value) {
$vars = $function->getAttribute('vars', []);
if (!is_array($vars)) {
continue;
}
foreach ($vars as $key => $value) {
if ($value instanceof Document) {
continue;
}