Skip to content

Add missing fields to collections schema - #81

Open
ChristopherJennings wants to merge 2 commits into
mainfrom
chris/collections-preview-url
Open

ChristopherJennings wants to merge 2 commits into
mainfrom
chris/collections-preview-url

Conversation

@ChristopherJennings

@ChristopherJennings ChristopherJennings commented Sep 29, 2026 •

Copy link
Copy Markdown

What's Changed

Added the fields that exist on directus_collections in core but were missing from the collections schema:

  • preview_url: the Live Preview URL template, including the {{$version}} and {{$preview_base_url}} variables
  • color: the color of the collection's icon in the Data Studio (added in the 20210521A migration)
  • autosave_revision_interval: how often, in seconds, auto-saving a content version creates a revision. null falls back to the AUTOSAVE_REVISION_INTERVAL env var (default 300). Added in 20260512A.
  • status: active or inactive. Inactive collections reject API reads and writes with COLLECTION_INACTIVE as of 12.4.0. Added in 20260507A.

The schema now matches the non-alias fields in packages/system-data/src/fields/collections.yaml.

Related

This follows up the preview_base_url settings work:

Before 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

  • Add preview_base_url setting for previews directus#28227 merged after v12.4.1, so {{$preview_base_url}} isn't in a released version yet. Merge this alongside Add preview_base_url to settings #80.
  • pnpm build and pnpm lint pass. The one lint warning (no-ambiguous-paths on /deployments/webhooks/{provider}) was already there.
  • CollectionMeta in @directus/types also has system, but that's set by the API for system collections rather than stored in directus_collections, so it's left out.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ChristopherJennings ChristopherJennings changed the title Add preview_url to collections schema Add missing fields to collections schema Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant