Upgrading
Breaking changes and migration steps between payload-experiments release candidates.
The plugin is pre-1.0, so a minor release can require changes in your app. After every upgrade, run the migration and import-map commands, then work through the notes for each version you cross.
pnpm exec payload migrate:create
pnpm exec payload migrate
pnpm exec payload generate:importmapReview the generated migration before applying it. The full history is in the CHANGELOG.
To 0.4
Migrate four nullable columns
xp_experiments.page_collection and its version column _xp_experiments_v.version_page_collection, xp_phases.placement_docs and xp_state.retired_slugs. No backfill is needed. If you adopt the Experiment block for a blocks field, the migration also adds the block and slots tables, their version tables and the slot enum types. If you adopt xpGoalField(), each table using it (and its version table) gains one nullable text column for xpGoal.
Fix registrations the plugin now refuses at startup
- A registered blocks field must include the Experiment block and be top-level (inside rows, collapsibles or unnamed tabs only).
metricSourcesids may not start withclick:.
Expect new save and start refusals
- Saves on every registered
pages,blocksandpuckcollection can be refused withpage-busy(retry) orinteracting-tests(finish the other test first). - Start refuses
placement-unpublishedfor Experiment blocks and Puck slots found only on drafts: publish the page first. - Deciding a stopped page test refuses
page-target-unpublishedwhen the Original or winner page is unpublished. - Publishing content that names an undefined click goal is refused for managers.
Update TypeScript
admin.editorUrlnow receives a requirededitorargument ('puck' | 'blocks' | 'page') and an optionaldoc.Snapshot.healthandSummaryResponse.healthare unions; narrow a row before reading.path.ReadinessCodeandRefusalCodegaingoal-in-some-versionsandplacement-unchecked(andplacement-removedin rc.2).- Add-metric responses always include
warnings.
Optional: adopt the Puck integration objects
Replace hand-wired Puck pieces with experimentsPuck() and experimentsPuckEditor() through payload-puck >=0.10.3's integrations. See Puck.
To 0.3
linkIdentityrequiresverified: booleanand returns'linked' | 'verified' | 'skipped' | 'failed'. Passtrueonly from a request that proves account ownership in this browser.- Migrate the nullable
xp_identities.verified_atcolumn anduser_idindex, plusdecision_pages_released_atanddecision_pages_released_byonxp_experimentsand theirversion_counterparts on_xp_experiments_v. - Existing identity links become unverified, which only narrows crediting. To keep the old behaviour for old rows, an optional backfill is
UPDATE xp_identities SET verified_at = linked_at WHERE verified_at IS NULL;. - An unknown
pages.collectionsslug now throws at startup; register host page collections before this plugin. - The Tests nav moved to
/admin/rsc#TestsNavLinkServer; regenerate the import map. A host nav group must not also be called "Tests".
To 0.2
- Regenerate the import map: the Tests surface is registered through the import map, and without it the Tests routes show a "not installed" message.
ExperimentsRootView,CollectionListRedirectandCollectionEditRedirectmoved from/rscto/admin/rsc./admin/clientno longer exports the old edit-form components (StatusCell,SummaryCell,ExperimentActions,LockedFieldNotice,FlagPointSelect,ArmsField,AllocationField,TargetingAttributeField,TargetingOpField,TargetingValueField,ReviewPanel,PhaseHistory,ResultsView).- Prereleases publish under the npm
rcdist-tag. Install with@rcor an exact version.

