Skip to content

Commit d326086

Browse files
inuuer1tsuu
andauthored
docs: add info about changes in localized fields to v2 -> v3 migration guide (#11244)
### What? Information that locale fields in database are changing to a simpler data structure in v3. ### Why? Simple data migration is not enough to get it working, I had to spend quite some time to figure out migration files and still it required some manual input. Maybe others will find it useful when starting a v3 migration. ### How? I had to do some custom migration scripts on my own to get v3 to work with existing pages data. --------- Co-authored-by: Sasha <64744993+r1tsuu@users.noreply.github.com>
1 parent f9121c1 commit d326086

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

docs/migration-guide/overview.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,15 @@ For more details, see the [Documentation](https://payloadcms.com/docs/getting-st
414414
```
415415
1. The `./src/public` directory is now located directly at root level `./public` [see Next.js docs for details](https://nextjs.org/docs/pages/building-your-application/optimizing/static-assets)
416416
417+
1. Payload now automatically removes `localized: true` property from sub-fields if a parent is localized, as it's redunant and unnecessary. If you have some existing data in this structure and you want to disable that behavior, you need to enable `allowLocalizedWithinLocalized` flag in your payload.config [read more in documentation](https://payloadcms.com/docs/configuration/overview#compatibility-flags), or create a migration script that aligns your data.
418+
Mongodb example for a link in a page layout.
419+
420+
```diff
421+
- layout.columns.en.link.en.type.en
422+
+ layout.columns.en.link.type
423+
```
424+
425+
417426
## Custom Components
418427
419428
1. All Payload React components have been moved from the `payload` package to `@payloadcms/ui`. If you were previously importing components into your app from the `payload` package, for example to create Custom Components, you will need to change your import paths:

0 commit comments

Comments
 (0)