databases_create_string_attribute
Add a text field to a database collection to store character-based data with configurable size, requirements, and security options.
Instructions
Create a string attribute.
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. | |
| size | Yes | Attribute size for text attributes, in number of characters. | |
| required | Yes | Is attribute required? | |
| default | No | Default value for attribute when not provided. Cannot be set when attribute is required. | |
| array | No | Is attribute an array? | |
| encrypt | No | Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried. |