Files
Jake BarnbyandClaude Opus 4.7 fb4930741e refactor(migrations): split composite resourceId into parent/leaf
The migrations collection used a composite "{databaseId}:{collectionId}"
in resourceId for CSV/JSON imports and exports, which mixed two
identifiers in one column and broke queryability. Split it into parent
(database) and leaf (collection) attributes following the convention
used by other collections.

Schema (collection bumped to V25):
- Adds resourceInternalId, parentResourceId, parentResourceInternalId,
  parentResourceType to the migrations collection
- Drops _key_resource_id; adds per-attribute indexes for every
  resource-related attribute so all of them are queryable
- V25 backfills existing migration documents by splitting the legacy
  composite resourceId, mapping the legacy resourceType (database type)
  to parentResourceType, and looking up sequence IDs

API:
- /v1/migrations/csv|json/imports|exports replace the CompoundUID
  resourceId param with separate UID databaseId + collectionId params
- Worker now reads parent/leaf fields directly and recomposes the
  legacy "id:id" shape only at the boundary to utopia-php/migration

Backwards compatibility:
- Request V25 filter splits old-SDK resourceId into databaseId/collectionId
- Response V25 filter recomposes resourceId for old-SDK consumers and
  strips the new fields
- Query validator now allows querying every resource-related attribute

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 12:37:01 +12:00
..
2026-04-29 13:52:13 +02:00