Skip to content

Commit c78ec21

Browse files
authored
Merge pull request #35 from appwrite/dev
Update attributes
2 parents 196f6ef + 3c8efda commit c78ec21

12 files changed

+97
-20
lines changed

docs/databases.md

+11
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectio
213213
| key | string | **Required** Attribute Key. | |
214214
| required | boolean | Is attribute required? | |
215215
| default | boolean | Default value for attribute when not provided. Cannot be set when attribute is required. | |
216+
| newKey | string | New attribute key. | |
216217

217218
## Create datetime attribute
218219

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

254256
## Create email attribute
255257

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

293296
## Create enum attribute
294297

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

334338
## Create float attribute
335339

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

377382
## Create integer attribute
378383

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

420426
## Create IP address attribute
421427

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

459466
## Create relationship attribute
460467

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

522531
## Create URL attribute
523532

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

561571
## Get attribute
562572

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

611622
## List documents
612623

docs/examples/databases/update-boolean-attribute.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@ $result = $databases->updateBooleanAttribute(
1515
collectionId: '<COLLECTION_ID>',
1616
key: '',
1717
required: false,
18-
default: false
18+
default: false,
19+
newKey: '' // optional
1920
);

docs/examples/databases/update-datetime-attribute.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@ $result = $databases->updateDatetimeAttribute(
1515
collectionId: '<COLLECTION_ID>',
1616
key: '',
1717
required: false,
18-
default: ''
18+
default: '',
19+
newKey: '' // optional
1920
);

docs/examples/databases/update-email-attribute.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@ $result = $databases->updateEmailAttribute(
1515
collectionId: '<COLLECTION_ID>',
1616
key: '',
1717
required: false,
18-
default: '[email protected]'
18+
default: '[email protected]',
19+
newKey: '' // optional
1920
);

docs/examples/databases/update-enum-attribute.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@ $result = $databases->updateEnumAttribute(
1616
key: '',
1717
elements: [],
1818
required: false,
19-
default: '<DEFAULT>'
19+
default: '<DEFAULT>',
20+
newKey: '' // optional
2021
);

docs/examples/databases/update-float-attribute.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@ $result = $databases->updateFloatAttribute(
1717
required: false,
1818
min: null,
1919
max: null,
20-
default: null
20+
default: null,
21+
newKey: '' // optional
2122
);

docs/examples/databases/update-integer-attribute.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@ $result = $databases->updateIntegerAttribute(
1717
required: false,
1818
min: null,
1919
max: null,
20-
default: null
20+
default: null,
21+
newKey: '' // optional
2122
);

docs/examples/databases/update-ip-attribute.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@ $result = $databases->updateIpAttribute(
1515
collectionId: '<COLLECTION_ID>',
1616
key: '',
1717
required: false,
18-
default: ''
18+
default: '',
19+
newKey: '' // optional
1920
);

docs/examples/databases/update-relationship-attribute.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@ $result = $databases->updateRelationshipAttribute(
1414
databaseId: '<DATABASE_ID>',
1515
collectionId: '<COLLECTION_ID>',
1616
key: '',
17-
onDelete: RelationMutate::CASCADE() // optional
17+
onDelete: RelationMutate::CASCADE(), // optional
18+
newKey: '' // optional
1819
);

docs/examples/databases/update-string-attribute.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,7 @@ $result = $databases->updateStringAttribute(
1515
collectionId: '<COLLECTION_ID>',
1616
key: '',
1717
required: false,
18-
default: '<DEFAULT>'
18+
default: '<DEFAULT>',
19+
size: null, // optional
20+
newKey: '' // optional
1921
);

docs/examples/databases/update-url-attribute.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@ $result = $databases->updateUrlAttribute(
1515
collectionId: '<COLLECTION_ID>',
1616
key: '',
1717
required: false,
18-
default: 'https://example.com'
18+
default: 'https://example.com',
19+
newKey: '' // optional
1920
);

0 commit comments

Comments
 (0)