Skip to content

fix: proper globals max versions clean up #12611

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

r1tsuu
Copy link
Member

@r1tsuu r1tsuu commented May 29, 2025

Fixes #11879

@r1tsuu r1tsuu changed the title feat: proper globals max versions clean up, add deleteGlobalVersions to db adapters feat: add deleteGlobalVersions to db adapters, proper globals max versions clean up May 29, 2025
@r1tsuu r1tsuu requested a review from DanRibbens May 29, 2025 17:25
Copy link
Contributor

@DanRibbens DanRibbens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did we overthink this in adding a new db method?

where: deleteQuery,
})
if (globalConfig) {
await payload.db.deleteGlobalVersions({ slug, req, where: deleteQuery })
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm concerned this could be considered a breaking change. IF another db adapter existed in the community we've added a new function that won't exist. This is a grey area.

If we sent the global slug to db.deleteVersions would our current adapters have just worked?

@r1tsuu r1tsuu force-pushed the fix/delete-versions-global branch from 4e8b04b to 3927367 Compare May 30, 2025 14:18
@r1tsuu r1tsuu changed the title feat: add deleteGlobalVersions to db adapters, proper globals max versions clean up fix: proper globals max versions clean up May 30, 2025
@r1tsuu r1tsuu requested a review from DanRibbens May 31, 2025 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot clean up versions for Globals
2 participants