type

Rename

Confirmed collection or field identity continuity used during migration planning.

Properties

PropertyTypeDescription
KindRenameKindKind selects collection or field rename planning.
BeforeCollectionschema.CollectionBeforeCollection is the collection embedded in the previous artifact.
AfterCollectionschema.CollectionAfterCollection is its collection in current executable config.
BlockstringBlock names the block definition of a block field rename, whose collections are zero and whose fields are the definition's.
BeforeField*schema.FieldBeforeField and AfterField are set for a standalone field rename.
AfterField*schema.FieldThe AfterField value.
Fields[]FieldRenameFields contains all physical and nested field pairs for a collection rename.

Full signature

type Rename struct { // Kind selects collection or field rename planning. Kind RenameKind // BeforeCollection is the collection embedded in the previous artifact. BeforeCollection schema.Collection // AfterCollection is its collection in current executable config. AfterCollection schema.Collection // Block names the block definition of a block field rename, whose // collections are zero and whose fields are the definition's. Block string // BeforeField and AfterField are set for a standalone field rename. BeforeField *schema.Field AfterField *schema.Field // Fields contains a collection rename's own physical and nested field pairs. Fields []FieldRename }

Source adapters/postgres/migrate.go:48