TypeScript
"646587b51b84a01f2ba8",
response.$id,
"collectionId",
"fulltext",
["collectionId"],
["ASC"]
);```
works for localhost but when built into production it breaks and does not create attribute.
TL;DR
Production code breaks because the attribute `collectionId` is not available. Works fine on localhost. Problem arises in production.
Solution: Change `"collectionId"` in the `databases.createIndex` method to the correct attribute name to fix the issue.It works fine when hosted in preview on localhost but when its pushed to server it breaks
What's the error?
TypeScript
[Error] Timestamp: 2024-03-07T01:40:41+00:00
[Error] Method: POST
[Error] URL: /v1/databases/:databaseId/collections/:collectionId/indexes
[Error] Type: Appwrite\Extend\Exception
[Error] Message: Attribute not available: collectionId
[Error] File: /usr/src/code/app/controllers/api/databases.php
[Error] Line: 2486
Recommended threads
- User ID case sensitivity
I see that through REST (and SDK as well), getting a user is not case sensitive. And even though documentation does not clearly state that it is, the wording "V...
- Any way to temporarily bypass the email ...
Hey guys, any way to bypass the email verification to use the accounts again? i need to recover some projects that due to recent changes have been stopped, and ...
- How to use Sites on selfhosted appwrite
whenever I try to create a site even with template it says 404 nginx error