Skip to content

Store publish_at on revisions - #613

Draft
edalzell wants to merge 2 commits into
statamic:5.xfrom
edalzell:feature/revision-publish-at
Draft

edalzell wants to merge 2 commits into
statamic:5.xfrom
edalzell:feature/revision-publish-at

Conversation

@edalzell

@edalzell edalzell commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Companion to statamic/cms#11508 (scheduled revision publishing), which adds a publish_at date to revisions. This persists it in the revisions table so the core scheduler can query publish_at against the eloquent driver.

Adds a nullable publish_at timestamp column (fresh installs via the create migration, existing installs via an update script that publishes add_publish_at_to_revisions_table), maps it in Revision::fromModel()/toModel(), exposes it as a real column in RevisionQueryBuilder so whereNotNull('publish_at') / where('publish_at', '<=', now()) hit the column rather than attributes->, and round-trips it in the import/export commands.

Depends on statamic/cms#11508 for Revision::publishAt(), so tests will fail until that ships and the statamic/cms constraint is bumped.

@duncanmcclean

Copy link
Copy Markdown
Member

Converting to a draft until the Core PR is merged.

@duncanmcclean
duncanmcclean marked this pull request as draft September 3, 2026 08:13
@duncanmcclean duncanmcclean changed the title [5.x] Store publish_at on revisions Store publish_at on revisions Sep 3, 2026

This branch has not been deployed

No deployments
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.

2 participants