diff --git a/src/Appwrite/Migration/Migration.php b/src/Appwrite/Migration/Migration.php index fabf968b0..1dfbbb99d 100644 --- a/src/Appwrite/Migration/Migration.php +++ b/src/Appwrite/Migration/Migration.php @@ -90,7 +90,8 @@ abstract class Migration if (empty($new->getId())) { throw new Exception('Missing ID'); } - if (!array_diff($new->getArrayCopy(), $old)) { + + if (!array_diff_assoc($new->getArrayCopy(), $old)) { return; } diff --git a/src/Appwrite/Migration/Version/V06.php b/src/Appwrite/Migration/Version/V06.php index 686330620..90cdb3e2a 100644 --- a/src/Appwrite/Migration/Version/V06.php +++ b/src/Appwrite/Migration/Version/V06.php @@ -26,7 +26,7 @@ class V06 extends Migration { switch ($document->getAttribute('$collection')) { case Database::SYSTEM_COLLECTION_USERS: - if ($document->getAttribute('password-update', null)) { + if ($document->isSet('password-update')) { $document ->setAttribute('passwordUpdate', $document->getAttribute('password-update', $document->getAttribute('passwordUpdate', ''))) ->removeAttribute('password-update');