mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
(fix): backfill null migration generation IDs
This commit is contained in:
1 parent
22800b14d9
commit
1d94059ce3
2 files changed
+6
-2
No files matched your search
@@ -200,13 +200,13 @@ class V25 extends Migration
|
||||
}
|
||||
|
||||
if (
|
||||
$document->getAttribute('parentResourceInternalId', '') === ''
|
||||
(string) $document->getAttribute('parentResourceInternalId', '') === ''
|
||||
&& isset($internalIds['parentResourceInternalId'])
|
||||
) {
|
||||
$document->setAttribute('parentResourceInternalId', $internalIds['parentResourceInternalId']);
|
||||
}
|
||||
if (
|
||||
$document->getAttribute('resourceInternalId', '') === ''
|
||||
(string) $document->getAttribute('resourceInternalId', '') === ''
|
||||
&& isset($internalIds['resourceInternalId'])
|
||||
) {
|
||||
$document->setAttribute('resourceInternalId', $internalIds['resourceInternalId']);
|
||||
|
||||
@@ -33,7 +33,9 @@ final class V25Test extends TestCase
|
||||
'$id' => 'migration',
|
||||
'$collection' => 'migrations',
|
||||
'resourceId' => 'database:collection',
|
||||
'resourceInternalId' => null,
|
||||
'resourceType' => Resource::TYPE_DATABASE,
|
||||
'parentResourceInternalId' => null,
|
||||
]);
|
||||
|
||||
$result = $migration->migrate($document);
|
||||
@@ -84,7 +86,9 @@ final class V25Test extends TestCase
|
||||
'$id' => 'migration',
|
||||
'$collection' => 'migrations',
|
||||
'resourceId' => 'database:collection',
|
||||
'resourceInternalId' => null,
|
||||
'resourceType' => Resource::TYPE_DATABASE,
|
||||
'parentResourceInternalId' => null,
|
||||
]);
|
||||
|
||||
$migration->migrate($document);
|
||||
|
||||
Reference in new issue
Block a user