Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/Migration/Destinations/Appwrite.php
Original file line number Diff line number Diff line change
Expand Up @@ -1405,9 +1405,13 @@ protected function createRecord(Row $resource, bool $isLast): bool
);
// Strip row payload fields the table doesn't declare — guards against orphans surviving in source archives.
if ($dbForDatabases->getAdapter()->getSupportForAttributes()) {
$knownInternal = ['$id', '$permissions', '$collection', '$tenant', '$createdAt', '$updatedAt'];
foreach ($this->rowBuffer as $row) {
foreach ($row as $key => $value) {
if (\str_starts_with($key, '$')) {
if (!\in_array($key, $knownInternal, true)) {
$row->removeAttribute($key);
}
continue;
}

Expand Down
1 change: 1 addition & 0 deletions src/Migration/Sources/Appwrite.php
Original file line number Diff line number Diff line change
Expand Up @@ -1370,6 +1370,7 @@ private function exportRecords(string $entityName, string $fieldName, int $batch
unset($row['$collection']);
unset($row['$tableId']);
unset($row['$table']);
unset($row['$internalId']);

$row = self::getRecord($table->getDatabase()->getType(), [
'id' => $id,
Expand Down