Files
payload/test/versions/slugs.ts
Yunsup Sim ddb8ca4de2 fix(db-*): add delete version id for non-mongodb (#10613)
Fixes #10526 

### What?

`updateVersion` throws error at deleting before version of draft.

### Why?

When triggers `db.updateVersion` with non-mongodb environment,
`saveVersion` in `payload/src/versions/saveVersions.ts` doesn't remove
`id` in `versionData`.

### How?

Add `delete versionData.id` for non-mongodb environments.

---------

Co-authored-by: German Jablonski <43938777+GermanJablo@users.noreply.github.com>
2025-08-22 09:39:21 +01:00

55 lines
1.6 KiB
TypeScript

export const autosaveCollectionSlug = 'autosave-posts'
export const autosaveWithMultiSelectCollectionSlug = 'autosave-multi-select-posts'
export const autosaveWithDraftButtonSlug = 'autosave-with-draft-button-posts'
export const autosaveWithDraftValidateSlug = 'autosave-with-validate-posts'
export const customIDSlug = 'custom-ids'
export const draftCollectionSlug = 'draft-posts'
export const draftWithValidateCollectionSlug = 'draft-with-validate-posts'
export const draftWithMaxCollectionSlug = 'draft-with-max-posts'
export const postCollectionSlug = 'posts'
export const diffCollectionSlug = 'diff'
export const mediaCollectionSlug = 'media'
export const media2CollectionSlug = 'media2'
export const versionCollectionSlug = 'version-posts'
export const disablePublishSlug = 'disable-publish'
export const errorOnUnpublishSlug = 'error-on-unpublish'
export const disablePublishGlobalSlug = 'disable-publish-global'
export const textCollectionSlug = 'text'
export const collectionSlugs = [
autosaveCollectionSlug,
autosaveWithMultiSelectCollectionSlug,
draftCollectionSlug,
postCollectionSlug,
diffCollectionSlug,
mediaCollectionSlug,
media2CollectionSlug,
versionCollectionSlug,
textCollectionSlug,
]
export const autoSaveGlobalSlug = 'autosave-global'
export const autosaveWithDraftButtonGlobal = 'autosave-with-draft-button-global'
export const draftGlobalSlug = 'draft-global'
export const draftWithMaxGlobalSlug = 'draft-with-max-global'
export const globalSlugs = [autoSaveGlobalSlug, draftGlobalSlug]
export const localizedCollectionSlug = 'localized-posts'
export const localizedGlobalSlug = 'localized-global'