v2.x to v3.0
v3 has two independent parts: a set of config changes (which throw at startup until you rename the keys) and a data migration for the stored Stream metadata. Do both.Requires Payload CMS 3.83.0 or later and Node.js 22 or later. Upgrade Payload (and Node, if needed) first if you
are below either.
Config changes (breaking)
Several config keys were renamed or removed in v3. Most throw at boot with a targeted message, so a v2 config crashes on startup until you update it. The last three rows are the exception — they produce no boot error (they are a naming convention, silently ignored, or always overridden), but you should still clean them up:
Per-service keys are unchanged:
storage.apiKey and stream.apiKey stay as they are.
New in v3 (optional, nothing to migrate — adopt when you need them):
- Client uploads — browser-direct uploads, configured under
storage.clientUploads(storage.clientUploads: trueshorthand, or the full config). There is nomodeoption — the transport is chosen automatically (presigned S3 when the zone setsstorage.s3, otherwise a deployed Edge Script). - Per-collection zones and libraries — point a collection at its own storage zone / stream library with a full config; the top-level
storage/streambecome optional. storage.s3— S3-compatible zone access.stream.referer— Referer header for MP4-fallback requests behind BlockNoneReferrer libraries.- Per-collection
stream.tus: false— disable TUS for one collection. - Stream webhook (
stream.webhook) — v2 had no webhook; MP4-fallback resolutions were fetched lazily on the first serve (v3 still does this as a fallback). The optional webhook pre-populatesbunnyData.stream.resolutionsthe moment encoding finishes instead. Setwebhook.secretto the library’s Read-Only API key (Bunny signs each callback with theX-BunnyStream-SignatureHMAC header) and point your Bunny library’s webhook at/api/storage-bunny/stream/webhook.
What changed (data)
v3 stores Bunny Stream metadata in a singlebunnyData group field instead of the flat bunnyVideoId and bunnyVideoMeta fields.
type and libraryId are computed on read (not stored). videoId is stored and indexed, so queries such as where: { 'bunnyData.stream.videoId': { equals } } keep working.
Migrate your data
The plugin ships a migration helper at@seshuk/payload-storage-bunny/migrations. It supports MongoDB, Postgres and SQLite and is idempotent — re-running it only touches documents that have not been migrated yet.
1
Upgrade the plugin to v3
2
Create a migration file
3
Call the helper from it
4
Run the migration
5
Remove the old fields
The legacy data lives in the You can run this as a one-off from any script with a Payload instance, or fold it into the migration once you’re confident:
bunnyVideoId and bunnyVideoMeta fields (MongoDB) — the bunny_video_id and bunny_video_meta columns on SQL. You do not declare these in your own config: the v2 plugin added them for you, and v3 no longer declares them, so after migrating they are leftover data with no field definition behind them.Once you have verified your app reads video metadata from bunnyData, delete the leftovers by passing drop: true. This unsets the fields (MongoDB) or drops the columns (Postgres/SQLite) for every managed collection:Database notes
- MongoDB
- Postgres
- SQLite
MongoDB is schemaless, so there is no ordering constraint.If your project doesn’t use
payload migrate, call migrateBunnyData({ payload }) once from any script that has a Payload instance.Options
v2.1.x to v2.2.0
What changed
The main changes in v2.2.0:
Migration actions:
- Move
purge.apiKeyto plugin-levelapiKey(old way still works but deprecated) - Replace
adminThumbnailwiththumbnail(required, no backward compatibility) - Optionally use new collection overrides for
storage.uploadTimeout,stream.uploadTimeout,stream.mp4Fallback,stream.tus.uploadTimeout
v2.0.x to v2.1.0
What changed
The main changes in v2.1.0:v1.x to v2.x
Version requirements
What changed
The main changes in v2.x:How to migrate
1
Update the package
2
Remove the options wrapper
- Before (v1.x)
- After (v2.x)
3
Fix stream config
- Before (v1.x)
- After (v2.x)
4
Fix purge config
- Before (v1.x)
- After (v2.x)
5
Remove experimental stuff
Complete example
- Before (v1.x)
- After (v2.x)