-
Notifications
You must be signed in to change notification settings - Fork 4
Add retention indexes references #33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
br41nslug
wants to merge
4
commits into
main
Choose a base branch
from
br41nslug/now-809
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,3 +2,5 @@ get: | |
| $ref: getCollectionFields.yaml | ||
| post: | ||
| $ref: createField.yaml | ||
| patch: | ||
| $ref: updateFields.yaml | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,227 @@ | ||
| summary: Update multiple Fields | ||
| description: Updates the given fields in the given collection. | ||
| operationId: updateFields | ||
| requestBody: | ||
| content: | ||
| application/json: | ||
| schema: | ||
| type: array | ||
| items: | ||
| type: object | ||
| properties: | ||
| type: | ||
| description: Directus specific data type. Used to cast values in the API. | ||
| example: integer | ||
| type: string | ||
| field: | ||
| type: string | ||
| description: Unique name of the field. Field name is unique within the | ||
| collection. | ||
| example: id | ||
| schema: | ||
| type: object | ||
| description: The schema info. | ||
| properties: | ||
| type: | ||
| description: The type of the field. | ||
| example: string | ||
| type: string | ||
| name: | ||
| type: string | ||
| description: The name of the field. | ||
| example: title | ||
| table: | ||
| type: string | ||
| description: The collection of the field. | ||
| example: posts | ||
| default_value: | ||
| type: string | ||
| description: The default value of the field. | ||
| example: | ||
| nullable: true | ||
| max_length: | ||
| type: integer | ||
| description: The max length of the field. | ||
| example: | ||
| nullable: true | ||
| is_nullable: | ||
| type: boolean | ||
| description: If the field is nullable. | ||
| example: false | ||
| is_primary_key: | ||
| type: boolean | ||
| description: If the field is primary key. | ||
| example: false | ||
| has_auto_increment: | ||
| type: boolean | ||
| description: If the field has auto increment. | ||
| example: false | ||
| foreign_key_column: | ||
| type: string | ||
| description: Related column from the foreign key constraint. | ||
| example: | ||
| nullable: true | ||
| foreign_key_table: | ||
| type: string | ||
| description: Related table from the foreign key constraint. | ||
| example: | ||
| nullable: true | ||
| comment: | ||
| type: string | ||
| description: Comment as saved in the database. | ||
| example: | ||
| nullable: true | ||
| schema: | ||
| type: string | ||
| description: Database schema (pg only). | ||
| example: public | ||
| foreign_key_schema: | ||
| type: string | ||
| description: Related schema from the foreign key constraint (pg only). | ||
| example: | ||
| nullable: true | ||
| meta: | ||
| type: object | ||
| description: The meta info. | ||
| nullable: true | ||
| properties: | ||
| id: | ||
| type: integer | ||
| description: Unique identifier for the field in the `directus_fields` | ||
| collection. | ||
| example: 3 | ||
| collection: | ||
| type: string | ||
| description: Unique name of the collection this field is in. | ||
| example: posts | ||
| field: | ||
| type: string | ||
| description: Unique name of the field. Field name is unique within | ||
| the collection. | ||
| example: title | ||
| special: | ||
| type: array | ||
| description: Transformation flag for field | ||
| example: | ||
| items: | ||
| type: string | ||
| nullable: true | ||
| system-interface: | ||
| type: string | ||
| description: What interface is used in the admin app to edit the value | ||
| for this field. | ||
| example: primary-key | ||
| nullable: true | ||
| options: | ||
| type: object | ||
| description: Options for the interface that's used. This format is | ||
| based on the individual interface. | ||
| example: | ||
| nullable: true | ||
| display: | ||
| type: string | ||
| description: What display is used in the admin app to display the | ||
| value for this field. | ||
| example: | ||
| nullable: true | ||
| display_options: | ||
| type: object | ||
| description: Options for the display that's used. This format is based | ||
| on the individual display. | ||
| example: | ||
| nullable: true | ||
| locked: | ||
| type: boolean | ||
| description: If the field can be altered by the end user. Directus | ||
| system fields have this value set to `true`. | ||
| example: true | ||
| readonly: | ||
| type: boolean | ||
| description: Prevents the user from editing the value in the field. | ||
| example: false | ||
| required: | ||
| type: boolean | ||
| description: If this field should be required. | ||
| example: false | ||
| hidden: | ||
| type: boolean | ||
| description: If this field should be hidden. | ||
| example: true | ||
| sort: | ||
| type: integer | ||
| description: Sort order of this field on the edit page of the admin | ||
| app. | ||
| example: 1 | ||
| nullable: true | ||
| width: | ||
| type: string | ||
| description: Width of the field on the edit form. | ||
| example: | ||
| nullable: true | ||
| enum: | ||
| - half | ||
| - half-left | ||
| - half-right | ||
| - full | ||
| - fill | ||
| - | ||
| group: | ||
| type: integer | ||
| description: What field group this field is part of. | ||
| example: | ||
| nullable: true | ||
| translation: | ||
| type: object | ||
| description: 'Key value pair of `<language>: <translation>` that allows | ||
| the user to change the displayed name of the field in the admin | ||
| app.' | ||
| example: | ||
| nullable: true | ||
| note: | ||
| type: string | ||
| description: A user provided note for the field. Will be rendered | ||
| alongside the interface on the edit page. | ||
| example: '' | ||
| nullable: true | ||
| responses: | ||
| '200': | ||
| description: Successful request | ||
| content: | ||
| application/json: | ||
| schema: | ||
| type: object | ||
| properties: | ||
| data: | ||
| type: array | ||
| items: | ||
| $ref: ../../../components/schemas/fields.yaml | ||
| '401': | ||
| $ref: ../../../components/responses.yaml#/UnauthorizedError | ||
| '404': | ||
| $ref: ../../../components/responses.yaml#/NotFoundError | ||
| security: [] | ||
| tags: | ||
| - Fields | ||
| parameters: | ||
| - name: collection | ||
| in: path | ||
| description: Unique identifier of the collection the item resides in. | ||
| schema: | ||
| type: string | ||
| required: true | ||
| - $ref: ../../../components/parameters.yaml#/ConcurrentIndexCreation | ||
| x-codeSamples: | ||
| - label: Directus SDK | ||
| lang: JavaScript | ||
| source: | | ||
| import { createDirectus, rest, updateFields } from '@directus/sdk'; | ||
|
|
||
| const client = createDirectus('directus_project_url').with(rest()); | ||
|
|
||
| const result = await client.request(updateFields(collection_name, partial_field_array)); | ||
| - label: GraphQL | ||
| lang: GraphQL | ||
| source: | | ||
| type Mutation { | ||
| update_fields_item(collection: String!, data: update_directus_fields_input!): directus_fields | ||
| } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.