Files
pad/docs
xarmian 77e1b386ef fix(import): relation defaults in imported schemas point at the imported items (BUG-3658) (#2159)
* fix(import): relation defaults in imported schemas point at the imported items (BUG-3658)

The collection insert stored the bundle's schema verbatim, so a relation or
multi_relation default named an item by its SOURCE id. In the new workspace
that id names nothing, and the next create dropped the default (or refused,
for a required field). Once every item has its new id, each imported schema's
relation defaults are remapped through the inserted-item map. An id the
import has no item for is dropped, logged and reported (ImportReport.
DroppedRelationDefaults, header X-Pad-Import-Dropped-Relation-Defaults); a
value that is not an id, such as a ref, is kept, since it resolves late. The
schema is re-encoded only when it changes, through a generic decode so keys
this build does not model survive.

Red on main: the single and multi defaults kept the source ids, the dangling
one was not dropped, nothing was reported; the header test is red without the
header line.

Claude-Session: https://claude.ai/code/session_01Q9WssCjFuHjSfLABoW4tmS

* docs(api): the import doors report dropped relation defaults in a header (BUG-3658)

Claude-Session: https://claude.ai/code/session_01Q9WssCjFuHjSfLABoW4tmS
2026-10-14 08:53:26 -04:00
..