migration#

lsst.images.serialization.migration(schema_name, from_major)#

Register a function that advances a tree one data-model major.

Parameters:
  • schema_name (str) – SCHEMA_NAME of the schema this migration applies to.

  • from_major (int) – Major version the incoming tree is at. The function must return a tree in the from_major + 1 shape.

Returns:

Decorator that registers and returns the function unchanged.

Return type:

Callable

Raises:

RuntimeError – If a migration is already registered for this schema and major.

Notes

The function receives the raw on-disk tree as a dict and may mutate and return it. It must not set schema_version; the caller does that as it chains steps.

This page was last modified on .