You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DB create events sending back $collectionId instead of $databaseId #12418
Not a maintainer, but this may be coming from a compatibility boundary between the new TablesDB route/model and the legacy document/collection path.
For row creation, src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Create.php extends the document-create route, but the route itself is already TablesDB-shaped: /v1/tablesdb/:databaseId/tables/:tableId/rows, audit event row.create, audit resource database/{request.databaseId}/table/{request.tableId}, and response model MODEL_ROW.
If the realtime/event serialization still reuses the older document payload shape, it could explain why $collectionId leaks through even though the TablesDB route receives databaseId and tableId. It would help to compare the emitted event payload against the Row response model and check whether $tableId is missing entirely or whether $collectionId is being used as a backwards-compatible alias.
Hi, I'd like to work on this. Could I be assigned?
Plan: reproduce on the latest version with a function triggered on a TablesDB row create event and compare the event payload with the documented Row model. If the event still goes through the legacy document model, I'll make the TablesDB row events serialize the payload with MODEL_ROW, so it has $tableId and $databaseId instead of $collectionId. The legacy Collections API payload stays as it is. I'll add an e2e test that checks the payload keys of a row create event.
Row create events now carry $databaseId and $tableId on every path: single create, bulk create and transaction commit. The commit path was the one missing $databaseId; #13535 fixed it, and that fix shipped in 2.1.0. #14216 also removes the internal $collection field from commit and bulk event payloads.
Please reopen if you still see $collectionId on a TablesDB row event on 2.1.0 or later.
Activity
vaguul commentedon Jun 1, 2026
Not a maintainer, but this may be coming from a compatibility boundary between the new TablesDB route/model and the legacy document/collection path.
For row creation,
src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Create.phpextends the document-create route, but the route itself is already TablesDB-shaped:/v1/tablesdb/:databaseId/tables/:tableId/rows, audit eventrow.create, audit resourcedatabase/{request.databaseId}/table/{request.tableId}, and response modelMODEL_ROW.If the realtime/event serialization still reuses the older document payload shape, it could explain why
$collectionIdleaks through even though the TablesDB route receivesdatabaseIdandtableId. It would help to compare the emitted event payload against the Row response model and check whether$tableIdis missing entirely or whether$collectionIdis being used as a backwards-compatible alias.iakshkhurana commentedon Oct 1, 2026
Hi, I'd like to work on this. Could I be assigned?
Plan: reproduce on the latest version with a function triggered on a TablesDB row create event and compare the event payload with the documented Row model. If the event still goes through the legacy document model, I'll make the TablesDB row events serialize the payload with
MODEL_ROW, so it has$tableIdand$databaseIdinstead of$collectionId. The legacy Collections API payload stays as it is. I'll add an e2e test that checks the payload keys of a row create event.HarshMN2345 commentedon Oct 8, 2026
Row create events now carry
$databaseIdand$tableIdon every path: single create, bulk create and transaction commit. The commit path was the one missing$databaseId; #13535 fixed it, and that fix shipped in 2.1.0. #14216 also removes the internal$collectionfield from commit and bulk event payloads.Please reopen if you still see
$collectionIdon a TablesDB row event on 2.1.0 or later.