databases_create_relationship_attribute
Define relationships between collections in Appwrite databases to link related data entries and establish data connections.
Instructions
Create relationship attribute. Learn more about relationship attributes.
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). | |
| related_collection_id | Yes | Related Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). | |
| type | Yes | Relation type | |
| two_way | No | Is Two Way? | |
| key | No | Attribute Key. | |
| two_way_key | No | Two Way Attribute Key. | |
| on_delete | No | Constraints option |