type

Rename

Explicit committed content-identity intent.

Properties

PropertyTypeDescription
CollectionBeforeschema.CollectionSlugCollectionBefore and CollectionAfter are current public slugs. Both are empty for a block field rename.
CollectionAfterschema.CollectionSlugThe CollectionAfter value.
BlockstringBlock names the block definition whose field is renamed. The definition is shared, so the rename moves the field's content in every stored block of it, in every resource and version snapshot.
FieldBeforestringFieldBefore and FieldAfter are canonical field paths, relative to Block for a block field rename. Empty paths mean the rename applies to the collection itself.
FieldAfterstringThe FieldAfter value.
Fields[]FieldRenameFields records every nested or top-level field path whose identity changed as part of a collection rename.

How it works

Inference may propose a rename, but runners execute only persisted intent. Collection renames include their own nested and top-level field identity changes; a field renamed inside a block definition is one block field rename for every placement of the block.

Full signature

type Rename struct { // CollectionBefore and CollectionAfter are current public slugs. Both are // empty for a block field rename. CollectionBefore schema.CollectionSlug `json:"collectionBefore,omitempty"` CollectionAfter schema.CollectionSlug `json:"collectionAfter,omitempty"` // Block names the block definition whose field is renamed. The definition // is shared, so the rename moves the field's content in every stored block // of it, in every resource and version snapshot. Block string `json:"block,omitempty"` // FieldBefore and FieldAfter are canonical field paths, relative to Block // for a block field rename. Empty paths mean the rename applies to the // collection itself. FieldBefore string `json:"fieldBefore,omitempty"` FieldAfter string `json:"fieldAfter,omitempty"` // Fields records every nested or top-level field path whose identity changed // as part of a collection rename. Fields []FieldRename `json:"fields,omitempty"` }

Source migration/migration.go:220