databases_update_enum_attribute
Modify an enum attribute in an Appwrite database collection by updating its allowed values, requirements, or default setting to adapt data validation rules.
Instructions
Update an enum attribute. Changing the default value will not update already existing documents.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| database_id | Yes | Database ID. | |
| collection_id | Yes | Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). | |
| key | Yes | Attribute Key. | |
| elements | Yes | Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 255 characters long. | |
| required | Yes | Is attribute required? | |
| default | Yes | Default value for attribute when not provided. Cannot be set when attribute is required. | |
| new_key | No | New attribute key. |