diff --git a/docs/migration-guide/overview.mdx b/docs/migration-guide/overview.mdx index 99e4bf99908..0f1fd566ef1 100644 --- a/docs/migration-guide/overview.mdx +++ b/docs/migration-guide/overview.mdx @@ -1104,6 +1104,57 @@ plugins: [ If you have custom features for `@payloadcms/richtext-lexical` you will need to migrate your code to the new API. Read more about the new API in the [documentation](https://payloadcms.com/docs/rich-text/building-custom-features). +## Reserved Field names + +Payload reserves certain field names for internal use. Using any of the following names in your collections or globals will result in those fields being sanitized from the config, which can cause deployment errors. Ensure that any conflicting fields are renamed before migrating. + +### General Reserved Names + +- `file` +- `_id` (MongoDB only) +- `__v` (MongoDB only) + +**Important Note**: It is recommended to avoid using field names with an underscore (`_`) prefix unless explicitly required by a plugin. Payload uses this prefix for internal columns, which can lead to conflicts in certain SQL conditions. The following are examples of reserved internal columns (this list is not exhaustive and other internal fields may also apply): + +- `_order` +- `_path` +- `_uuid` +- `_parent_id` +- `_locale` + +### Auth-Related Reserved Names + +These are restricted if your collection uses `auth`: true and does not have `disableAuthStrategy: true`: +- `salt` +- `hash` +- `apiKey` (when `auth.useAPIKey: true` is enabled) +- `useAPIKey` (when `auth.useAPIKey: true` is enabled) +- `resetPasswordToken` +- `resetPasswordExpiration` +- `password` +- `email` +- `username` + +### Upload-Related Reserved Names + +These apply if your collection has `upload: true` configured: + +- `filename` +- `mimetype` +- `filesize` +- `width` +- `height` +- `focalX` +- `focalY` +- `url` +- `thumbnailURL` + +If `imageSizes` is configured, the following are also reserved: + +- `sizes` + +If any of these names are found in your collection / global fields, update them before migrating to avoid unexpected issues. + ## Upgrade from previous beta Reference this [community-made site](https://payload-releases-filter.vercel.app/?version=3&from=152429656&to=188243150&sort=asc&breaking=on). Set your version, sort by oldest first, enable breaking changes only.