Create every entity of the simple metadata in one action per migration
Why
Activating a workspace runs about 1,300 single-row metadata INSERTs, one create action per entity. Since #32392 a metadata name can opt into having all its creates of a migration merged into one action, inserted in chunks of 500. Only view fields used it. This PR opts in every metadata whose create is a plain insert, which covers most of the remaining rows at activation (page layout widgets, command menu items, page layout tabs, views, page layouts, view field groups, search field metadata and the smaller ones).
What
- 33 metadata names are added to
METADATA_NAMES_WITH_AGGREGATED_CREATE_ACTIONSnext toviewField. Their create handlers transpile every entity of the action throughtranspileUniversalFlatEntitiesOrThrowinstead of reading the first one. The change in each handler is the same wrap, so most of the diff is indentation. - The page layout widget handler applies its legacy grid position fallback per entity.
- The view field group handler now inserts through the shared
insertFlatEntitiesInRepositorylike the others. - The aggregator flattens entities with
map().flat()so it typechecks with more than one metadata name in the list.
Left as one action per entity, on purpose:
objectMetadata,fieldMetadata,index: their create also changes the workspace schema.navigationMenuItem,viewFilterGroup,rowLevelPermissionPredicateGroup: an entity can point to a parent of the same metadata created in the same migration, and the parent id is only resolvable once its action has run.frontComponent,applicationVariable,roleTarget: their create does more than an insert (files, encryption, an async application lookup).logicFunction,fieldMetadataOption: code after the aggregation still reads the first entity of their create actions.
Order is unchanged: computeOrderedMigrationActions already emits the creates of one metadata name as one contiguous block, and cross entity validation runs before the aggregation.
Screenshots
No UI change.