mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 00:49:02 +00:00
Merge pull request #1576 from TorstenDittmann/fix-migration-warning
fix(migration): better warning message
This commit is contained in:
commit
1a0b108f56
1 changed files with 4 additions and 5 deletions
|
|
@ -97,15 +97,14 @@ abstract class Migration
|
|||
|
||||
foreach ($all as $document) {
|
||||
go(function () use ($document, $callback) {
|
||||
if (empty($document->getId()) || empty($document->getCollection())) {
|
||||
Console::warning('Skipped Document due to missing ID or Collection.');
|
||||
return;
|
||||
}
|
||||
|
||||
$old = $document->getArrayCopy();
|
||||
$new = call_user_func($callback, $document);
|
||||
|
||||
if (empty($new->getId())) {
|
||||
Console::warning('Skipped Document due to missing ID.');
|
||||
return;
|
||||
}
|
||||
|
||||
if (!$this->check_diff_multi($new->getArrayCopy(), $old)) {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue