Remove V1 Upgrade Collections Implementation Log
Started: 2026-05-19 14:05 UTC Completed: 2026-05-19 14:08 UTC
Summary
Removed the V1 upgrade collections from the active Payload registry, deleted their collection definition file, regenerated Payload types/import map, added a destructive migration to drop the V1 tables, and updated current docs to describe upgrade state as repository-owned.
flowchart TD
registry["Payload collection registry"] --> appCollections["Current app/CMS collections"]
removed["V1 upgrade collections"]:::removed
migration["20260519_000003_drop_v1_upgrade_collections"]
upgradePaths["Upgrade API/CLI/worker paths"] --> repository["In-memory AnuvaRepository"]
repository -. deferred .-> durable["Future durable store"]
registry -. removed .-> removed
migration --> removed
classDef removed fill:#f7d7d7,stroke:#a33,color:#111
Tasks Completed
- Removed
AnuvaV1Collectionsimport and registry spread fromsrc/collections/anuvax/index.ts. - Deleted
src/collections/anuvax/anuva-v1.ts. - Added
src/migrations/20260519_000003_drop_v1_upgrade_collections.ts. - Registered the new migration in
src/migrations/index.ts. - Regenerated
src/payload-types.ts. - Regenerated
src/app/(payload)/admin/importMap.js; it ended with no net tracked diff after formatting. - Updated current docs to remove active V1 collection language and add repository-owned upgrade state.
- Documented deferred durable
AnuvaRepositorypersistence indocs/state/KnownGaps.md.
Files Changed
Code and generated artifacts:
src/collections/anuvax/index.tssrc/collections/anuvax/anuva-v1.tssrc/migrations/20260519_000003_drop_v1_upgrade_collections.tssrc/migrations/index.tssrc/payload-types.ts
Docs:
docs/core/PayloadDataModel.mddocs/core/WorkersAndJobs.mddocs/state/CollectionMap.mddocs/state/WorkflowMap.mddocs/state/KnownGaps.mddocs/changes/2026-05-19-1334-remove-v1-upgrade-collections/ImplementationPlan.mddocs/changes/2026-05-19-1334-remove-v1-upgrade-collections/ImplementationLog.md
Commands Run
rg -n "conversation_states_v1|workflow_runs_v1|workflow_stage_gates_v1|source_documents_v1|scene_edit_history_v1|quality_metrics_v1|rss_feed_configs_v1|rss_ingest_runs_v1|rss_entries_v1|AnuvaV1Collections|ConversationStatesV1|WorkflowRunsV1|WorkflowStageGatesV1|SourceDocumentsV1|SceneEditHistoryV1|QualityMetricsV1|RssFeedConfigsV1|RssIngestRunsV1|RssEntriesV1" src scripts tests docs -g '!docs/_stale/**'pnpm generate:typespnpm generate:importmappnpm exec biome check --write src/app/\(payload\)/admin/importMap.js src/payload-types.ts src/migrations/20260519_000003_drop_v1_upgrade_collections.ts src/migrations/index.ts src/collections/anuvax/index.ts docs/core/PayloadDataModel.md docs/core/WorkersAndJobs.md docs/state/CollectionMap.md docs/state/WorkflowMap.md docs/state/KnownGaps.md docs/changes/2026-05-19-1334-remove-v1-upgrade-collections/ImplementationPlan.mdpnpm exec biome check src/app/\(payload\)/admin/importMap.js src/payload-types.ts src/migrations/20260519_000003_drop_v1_upgrade_collections.ts src/migrations/index.ts src/collections/anuvax/index.tsgit diff --checkpnpm typecheckpnpm exec vitest run --config ./vitest.config.mts tests/unit/anuva-orchestration-service.test.ts tests/unit/anuva-source-adapters.test.tspnpm lint
Verification Results
Passed:
pnpm generate:typeswrote updated Payload types. It emitted a non-fatal Nodemailer DNS warning forsmtp.ethereal.email.pnpm generate:importmapwrote the import map. It emitted the same non-fatal Nodemailer DNS warning.- Change-scoped Biome check passed for touched code/generated files.
git diff --checkpassed.pnpm typecheckpassed.- Reference search shows V1 slug references only in the new migration and change-planning docs, not active runtime code, generated types, or current core/state docs.
Failed or blocked:
- Targeted Vitest run failed one pre-existing-looking orchestration assertion in
tests/unit/anuva-orchestration-service.test.ts:115: not every generated action metadata record hasartifactRefs.length > 0.tests/unit/anuva-source-adapters.test.tspassed. pnpm lintis still blocked by unrelated existing Biome issues indocs/web/stylesheets.cssanddocs/_stale/archive/globals.css. Change-scoped Biome checks passed.
Decisions
- Deleted the V1 collection file outright, per the answered breakdown.
- Added a destructive migration because the answered breakdown said no hosted V1 data export is needed.
- Deferred durable
AnuvaRepositorypersistence and documented it as a known gap instead of adding a repository adapter in this change.
Deviations
- Did not add tests because no active runtime code path changed. The targeted Anuva unit test failure is not caused by this collection removal and remains as a separate test/runtime issue.
- Did not run
pnpm test:intafter the targeted Anuva Vitest failure because the same failing unit assertion would block the broader suite signal.
Known Gaps
- The new migration has not been executed against a live database in this turn.
- The rollback migration recreates empty V1 tables/schema only; it cannot restore dropped V1 table data.
- Durable upgrade-state persistence remains deferred to a future
AnuvaRepositorystorage design.