Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions docs/databases.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectio
| key | string | **Required** Attribute Key. | |
| required | boolean | Is attribute required? | |
| default | boolean | Default value for attribute when not provided. Cannot be set when attribute is required. | |
| newKey | string | New attribute key. | |

## Create datetime attribute

Expand Down Expand Up @@ -250,6 +251,7 @@ PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectio
| key | string | **Required** Attribute Key. | |
| required | boolean | Is attribute required? | |
| default | string | Default value for attribute when not provided. Cannot be set when attribute is required. | |
| newKey | string | New attribute key. | |

## Create email attribute

Expand Down Expand Up @@ -289,6 +291,7 @@ PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectio
| key | string | **Required** Attribute Key. | |
| required | boolean | Is attribute required? | |
| default | string | Default value for attribute when not provided. Cannot be set when attribute is required. | |
| newKey | string | New attribute key. | |

## Create enum attribute

Expand Down Expand Up @@ -330,6 +333,7 @@ PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectio
| elements | array | 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 | boolean | Is attribute required? | |
| default | string | Default value for attribute when not provided. Cannot be set when attribute is required. | |
| newKey | string | New attribute key. | |

## Create float attribute

Expand Down Expand Up @@ -373,6 +377,7 @@ PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectio
| min | number | Minimum value to enforce on new documents | |
| max | number | Maximum value to enforce on new documents | |
| default | number | Default value for attribute when not provided. Cannot be set when attribute is required. | |
| newKey | string | New attribute key. | |

## Create integer attribute

Expand Down Expand Up @@ -416,6 +421,7 @@ PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectio
| min | integer | Minimum value to enforce on new documents | |
| max | integer | Maximum value to enforce on new documents | |
| default | integer | Default value for attribute when not provided. Cannot be set when attribute is required. | |
| newKey | string | New attribute key. | |

## Create IP address attribute

Expand Down Expand Up @@ -455,6 +461,7 @@ PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectio
| key | string | **Required** Attribute Key. | |
| required | boolean | Is attribute required? | |
| default | string | Default value for attribute when not provided. Cannot be set when attribute is required. | |
| newKey | string | New attribute key. | |

## Create relationship attribute

Expand Down Expand Up @@ -518,6 +525,8 @@ PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectio
| key | string | **Required** Attribute Key. | |
| required | boolean | Is attribute required? | |
| default | string | Default value for attribute when not provided. Cannot be set when attribute is required. | |
| size | integer | Maximum size of the string attribute. | |
| newKey | string | New attribute key. | |

## Create URL attribute

Expand Down Expand Up @@ -557,6 +566,7 @@ PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectio
| key | string | **Required** Attribute Key. | |
| required | boolean | Is attribute required? | |
| default | string | Default value for attribute when not provided. Cannot be set when attribute is required. | |
| newKey | string | New attribute key. | |

## Get attribute

Expand Down Expand Up @@ -607,6 +617,7 @@ PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectio
| collectionId | string | **Required** Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). | |
| key | string | **Required** Attribute Key. | |
| onDelete | string | Constraints option | |
| newKey | string | New attribute key. | |

## List documents

Expand Down
3 changes: 2 additions & 1 deletion docs/examples/databases/update-boolean-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ $result = $databases->updateBooleanAttribute(
collectionId: '<COLLECTION_ID>',
key: '',
required: false,
default: false
default: false,
newKey: '' // optional
);
3 changes: 2 additions & 1 deletion docs/examples/databases/update-datetime-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ $result = $databases->updateDatetimeAttribute(
collectionId: '<COLLECTION_ID>',
key: '',
required: false,
default: ''
default: '',
newKey: '' // optional
);
3 changes: 2 additions & 1 deletion docs/examples/databases/update-email-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ $result = $databases->updateEmailAttribute(
collectionId: '<COLLECTION_ID>',
key: '',
required: false,
default: '[email protected]'
default: '[email protected]',
newKey: '' // optional
);
3 changes: 2 additions & 1 deletion docs/examples/databases/update-enum-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ $result = $databases->updateEnumAttribute(
key: '',
elements: [],
required: false,
default: '<DEFAULT>'
default: '<DEFAULT>',
newKey: '' // optional
);
3 changes: 2 additions & 1 deletion docs/examples/databases/update-float-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ $result = $databases->updateFloatAttribute(
required: false,
min: null,
max: null,
default: null
default: null,
newKey: '' // optional
);
3 changes: 2 additions & 1 deletion docs/examples/databases/update-integer-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ $result = $databases->updateIntegerAttribute(
required: false,
min: null,
max: null,
default: null
default: null,
newKey: '' // optional
);
3 changes: 2 additions & 1 deletion docs/examples/databases/update-ip-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ $result = $databases->updateIpAttribute(
collectionId: '<COLLECTION_ID>',
key: '',
required: false,
default: ''
default: '',
newKey: '' // optional
);
3 changes: 2 additions & 1 deletion docs/examples/databases/update-relationship-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ $result = $databases->updateRelationshipAttribute(
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
key: '',
onDelete: RelationMutate::CASCADE() // optional
onDelete: RelationMutate::CASCADE(), // optional
newKey: '' // optional
);
4 changes: 3 additions & 1 deletion docs/examples/databases/update-string-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,7 @@ $result = $databases->updateStringAttribute(
collectionId: '<COLLECTION_ID>',
key: '',
required: false,
default: '<DEFAULT>'
default: '<DEFAULT>',
size: null, // optional
newKey: '' // optional
);
3 changes: 2 additions & 1 deletion docs/examples/databases/update-url-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ $result = $databases->updateUrlAttribute(
collectionId: '<COLLECTION_ID>',
key: '',
required: false,
default: 'https://example.com'
default: 'https://example.com',
newKey: '' // optional
);
Loading