Back

Database attribute labeled "stuck", cannot delete it or recreate

  • 0
  • Self Hosted
  • Databases
Ludwig
12 Mar, 2025, 16:05

See screenshots. I'm on self-hosted, 1.6.1.

I can click options -> delete and then get the green success toast it was deleted, but when I refresh it's still there. Also can't recreate it with the same name, then I get "Attribute with the requested key already exists. Attribute keys must be unique, try again with a different key."

When I create a new attribute with a different name, and remove this "testResults" entirely from my data model, I can create a new document (which doesn't have that key anymore), on the db. But when I try to do a partial update with updateDocument I get :

TypeScript
AppwriteException: Invalid document structure: Unknown attribute: "testResults"
    at _Client.call (/usr/local/server/src/function/node_modules/node-appwrite/src/client.ts:352:12)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at Databases.updateDocument (/usr/local/server/src/function/node_modules/node-appwrite/src/services/databases.ts:1831:13)

Even though i'm nowhere trying to set that key. So this seems to be a total dead lock?

What can I do now, any way to recover from this? And why is this even happening, is there a way to avoid this?

TL;DR
Database attribute "testResults" is labeled as 'stuck' in self-hosted 1.6.1. Deleting and recreating it doesn't work due to the unique key constraint. Removing it from the data model allows creating new documents but causes issues with updates. To recover, developers might need to contact support for deeper investigation into why this issue is occurring and how to avoid it in the future.
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