Merge pull request #860 from appwrite/fix-migration-comparsion-bug
Fix migration comparison bug
This commit is contained in:
commit
5058f0fdb3
2 changed files with 3 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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');
|
||||
|
|
Loading…
Reference in a new issue