Skip to content
Back

Attribute Update after creation

  • 2
  • Self Hosted
  • Tools
  • Web
Matt
26 Nov, 2023, 07:53
TL;DR
User created an attribute with 5 enum variables, then successfully created a document with Node.js. They then tried to update the attribute by adding 1 more enum variable. However, when they tried to create a new document with the updated attribute, it failed. User wants to know the exact steps to reproduce and mentions that they are using the 1.3.8 version of Appwrite. They are also unable to update the size attribute for strings. User is asking for solutions and mentions an open issue on GitHub. Appwrite doesn't allow updating attributes due to potential downtime and compatibility issues. However, in version 1.3,
fafa
26 Nov, 2023, 08:13

It's funny because the issue Steven linked says it improves the attribute updating, but in fact the only thing you can update is the required option and deleting. So updating an attribute is basically non-existent <:1lolol:638463120632709144>

Drake
27 Nov, 2023, 16:47

what exactly do you need to do?

fafa
27 Nov, 2023, 17:00

Update the size for example (it's one of the most crucial parts in my view)

Matt
29 Nov, 2023, 14:48

sometime i can't create new document after updating attribute such as add a new enum variable

Matt
29 Nov, 2023, 14:50

also i can't update a string size, what should i do in production if theere some change with string size attribute??

Drake
29 Nov, 2023, 15:46

That's weird...that shouldn't happen...what exactly happens? Do you get an error?

Drake
29 Nov, 2023, 17:44

As for this, you can 👍🏼 this issue: https://github.com/appwrite/appwrite/issues/5458

For some background, we didn't allow updating anything about attributes because:

  1. it can lock up the table causing downtime in your app
  2. it can break older apps that are dependent on the older schema

In 1.3, we added support for partially updating attributes in a way that wouldn't lock up your tables.

Eventually, we want to add more support for updating attributes, but we're still concerned about the 2 points I mentioned

Matt
30 Nov, 2023, 02:00

im using 1.3.8 version self hosted, and the bug still exist, i can reproduce the bug by changing enum variable, and to fix that i need to recreating the attribute with updated enum variable

Drake
30 Nov, 2023, 02:34

What are the exact steps to reproduce?

Matt
30 Nov, 2023, 03:02
  1. create attribute, add 5 enum variable
  2. create 1 document with node js (success)
  3. update the attribute, and add 1 more enum variable
  4. create 1 document with node js (failed)
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