Add missing fields to collections schema - #81
Open
ChristopherJennings wants to merge 2 commits into
Open
ChristopherJennings wants to merge 2 commits into
ChristopherJennings wants to merge 2 commits into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What's Changed
Added the fields that exist on
directus_collectionsin core but were missing from the collections schema:preview_url: the Live Preview URL template, including the{{$version}}and{{$preview_base_url}}variablescolor: the color of the collection's icon in the Data Studio (added in the20210521Amigration)autosave_revision_interval: how often, in seconds, auto-saving a content version creates a revision.nullfalls back to theAUTOSAVE_REVISION_INTERVALenv var (default300). Added in20260512A.status:activeorinactive. Inactive collections reject API reads and writes withCOLLECTION_INACTIVEas of 12.4.0. Added in20260507A.The schema now matches the non-alias fields in
packages/system-data/src/fields/collections.yaml.Related
This follows up the
preview_base_urlsettings work:$preview_base_urlvariable for a collection's Preview URLpreview_base_urlto the settings schemaBefore this PR, the spec documented the new setting but not the collection field that uses it. The other fields came up while checking that gap.
Review Notes
{{$preview_base_url}}isn't in a released version yet. Merge this alongside Add preview_base_url to settings #80.pnpm buildandpnpm lintpass. The one lint warning (no-ambiguous-pathson/deployments/webhooks/{provider}) was already there.CollectionMetain@directus/typesalso hassystem, but that's set by the API for system collections rather than stored indirectus_collections, so it's left out.🤖 Generated with Claude Code