Skip to content

updated to TablesDB#170

Merged
abnegate merged 5 commits intomainfrom
db-migration-api-issue
Apr 22, 2026
Merged

updated to TablesDB#170
abnegate merged 5 commits intomainfrom
db-migration-api-issue

Conversation

@ArnabChatterjee20k
Copy link
Copy Markdown
Contributor

TablesDB is backward compatible but that is the not case with the legacy databases

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 21, 2026

Greptile Summary

This PR migrates the Appwrite migration source from the legacy Databases SDK service to the new TablesDB service, updating all method names, response key names, and row-level metadata field references accordingly. The rowSecurity/documentSecurity backward-compatibility handling is applied consistently across both Table::fromArray() and the table-listing loop in Appwrite.php.

Confidence Score: 5/5

Safe to merge — all changes are targeted SDK method renames with no logic regressions introduced.

No P0/P1 issues found. Previously raised concerns (stale $collection unset, attributes fallback) have been explained or pre-exist the PR. The new code correctly handles the TablesDB API surface.

No files require special attention.

Important Files Changed

Filename Overview
src/Migration/Sources/Appwrite/Reader/API.php Migrates all Appwrite SDK calls from Databases service to TablesDB: listCollections→listTables, listAttributes→listColumns, listDocuments→listRows, getDocument→getRow, with matching response key updates.
src/Migration/Sources/Appwrite.php Replaces Databases with TablesDB service, adds rowSecurity fallback to documentSecurity when building table entities, and updates row metadata unsets ($collectionId removed, $tableId/$table added).
src/Migration/Resources/Database/Table.php Adds a (bool) cast and a final false fallback to fromArray's rowSecurity resolution, making it safe when neither rowSecurity nor documentSecurity is present in the source array.

Reviews (5): Last reviewed commit: "updated" | Re-trigger Greptile

Comment thread src/Migration/Sources/Appwrite.php
'name' => $table['name'],
'documentSecurity' => $table['documentSecurity'],
'rowSecurity' => $rowSecurity,
'documentSecurity' => $rowSecurity,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we only need rowSecurity

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need the documentsecurity as well -> it was missing earlier. Now here internally it will get replaced due to the fromArray. So passing both rowSecurity and documentSecurity.

@abnegate abnegate merged commit 111f622 into main Apr 22, 2026
4 checks passed
@abnegate abnegate deleted the db-migration-api-issue branch April 22, 2026 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants