Skip to content
Back

appwrite indexes not working (?

  • 0
  • 2
  • Databases
dei8bit
23 Apr, 2026, 21:41

i have this index:

TypeScript
       "indexes": [
                {
                    "key": "single-user-per-event",
                    "type": "unique",
                    "status": "available",
                    "columns": [
                        "eventID",
                        "userID"
                    ],
                    "orders": [
                        "asc",
                        "asc"
                    ]
                },
            ]

but for some reason i can continue creating multiple arrow with duplicate userID and eventID and appwrite dosen't get my an error...

as you can see in the picture 2, there're repeated userID and eventID in many rows

TL;DR
Indexes not working due to missing length definition for `eventID` and `userID`. Update the length to solve the issue.
24 Apr, 2026, 05:46

As I can see from the first screenshot you've shared, you haven't defined the length for the eventID and userID i.e. it is 0. Maybe that could be the possible reason behind the behaviour you're experiencing

24 Apr, 2026, 05:46

So try updating the length to something like 255 for both

28 Apr, 2026, 11:50

mmm apparently was a tremendous bug

28 Apr, 2026, 11:50

thanks 🙂

1
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more