@payloadcms/codemod 4.0.0-internal.6e89a16 → 4.0.0-internal.71538a3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/runbook/v4.mdx +0 -16
- package/package.json +1 -1
package/dist/runbook/v4.mdx
CHANGED
|
@@ -2193,22 +2193,6 @@ Upload collections now store `original` metadata and a `prefix` and `_objectKey`
|
|
|
2193
2193
|
|
|
2194
2194
|
**Postgres and SQLite:** after updating, run `payload migrate:create`, check that it adds these columns to each upload collection table and its versions table, then run `payload migrate`. Existing rows keep `null` values until their next write.
|
|
2195
2195
|
|
|
2196
|
-
### Upload collections save crop and focal point edits in `_transforms`
|
|
2197
|
-
|
|
2198
|
-
Upload collections now have a `_transforms` JSON field that saves the crop and focal point, so an edit can start again from the retained original. See [Saved crop and focal point](../upload/overview#saved-crop-and-focal-point).
|
|
2199
|
-
|
|
2200
|
-
- `_transforms` is a reserved field name on upload collections. If an upload collection defines its own field named `_transforms`, rename it and move its data before you update.
|
|
2201
|
-
- `focalX` and `focalY` stay available and match `_transforms.focalPoint` when it is set. For a document saved before `_transforms` existed, the first write that saves `_transforms` copies its focal point into `_transforms`.
|
|
2202
|
-
- Replacing the file now sets `focalX` and `focalY` to the center, unless the request sends a new focal point. Before, the old values stayed on the document, but the new image sizes did not use them.
|
|
2203
|
-
|
|
2204
|
-
**Postgres and SQLite:** run `payload migrate:create`, check that it adds a `_transforms` column to each upload collection table and its versions table, then run `payload migrate`. Existing rows keep `null` until their next write.
|
|
2205
|
-
|
|
2206
|
-
Upload collections also have a core-controlled `_stored` field on the main file, on `original`, and on each entry under `variants`. A value of `false` marks an entry with no stored object. A missing or `null` value means stored, so existing documents need no data backfill. Payload ignores client writes to this field. It is hidden in the Admin Panel, but can appear in API responses; it is not a field-level hidden value. See [Files with no stored default](../upload/transformers#files-with-no-stored-default).
|
|
2207
|
-
|
|
2208
|
-
`_stored` is now reserved for these file entries. If an upload collection already defines a custom `_stored` field, rename it and move its data, including data in saved versions, before upgrading. Remove the old custom values from `_stored`: existing `false` values would otherwise be treated as files with no stored object, and writes to the custom field would be ignored.
|
|
2209
|
-
|
|
2210
|
-
**Postgres and SQLite:** run `payload migrate:create`, check that it adds the `_stored` columns for file entries in each upload collection and its versions, then run `payload migrate`. Existing rows keep `null`.
|
|
2211
|
-
|
|
2212
2196
|
### File size types have been consolidated ([#16593](https://github.com/payloadcms/payload/pull/16593))
|
|
2213
2197
|
|
|
2214
2198
|
`FileSizeImproved` has been merged into `FileSize`. The `url`, `width`, `height`, `filesize`, `mimeType`, and `filename` properties now accept `null` directly on `FileSize`, matching what the database stores for sizes that were not generated.
|
package/package.json
CHANGED