mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 08:58:35 +00:00
adapt to review
This commit is contained in:
parent
4260d01bb9
commit
5e5ca0ba16
2 changed files with 8 additions and 6 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue