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
- [Beginner] CLI --queries Syntax Error & ...
Hi everyone! I am a beginner with Appwrite and trying to use the CLI, but I'm stuck with a syntax error. Any guidance would be greatly appreciated! 🙏 **Enviro...
- Increase by operators
I see appwrite have bunch of useful operators for querieng db. One more I would like to suggest is operators like increase the count of a int columns by 1,2.. ...
- [SOLVED] curl error Number: 6 — function...
Hello, I invested a lot of time in this error in a fresh install of appwrite 1.8.1 and lasted until fix, this if for helping anyone that can have the same weird...