ErrorsEntities, stores and migrations · rule
migration.backfill_outside_row
Computed backfill reads more than its row.
Area 5, Entities, stores and migrations; not declinable; the next step is usually the agent's.
A backfill reads only the record it fills:
migration { Draft.starred: { backfill: Note.starred }}
error The backfill for Draft.starred can't read Note.starred
--> database/migrations/20261020T1401_add_starred/changes.jadpo:3:19
|3 | backfill: Note.starred | ^^^^^^^^^^^^ another entity's field
- reason
- A backfill works each
Draftrecord's value out from that record's own fields, constants and pure functions, so it gives the same value whenever and wherever the migration runs. - next
- Work the value out from
Draft's own fields, or a constant (agent) - rule
- migration.
backfill_ outside_ row - help
- https://jadpo.
dev/docs/errors/migration. backfill_ outside_ row
Nor does it read a setting through a function it calls, a crypto
operation's key: included, since each deployment sets its own and
jadpo migrate apply is given none:
use notes/types { Label }library draft_labels { function default_label() -> Label { return config.draft_label }}
migration { Draft.label: { backfill: draft_labels.default_label() }}
error The backfill for Draft.label can't read config.draft_label
--> database/migrations/20261020T1401_add_label/changes.jadpo:3:19
|3 | backfill: draft_labels.default_label() | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ reads a setting, through `draft_labels.default_label`
- reason
- A backfill gives each
Draftrecord the value its own fields give, whenever and wherever the migration runs, anddraft_labels.default_labelreadsconfig.draft_label, which each deployment sets for itself. - next
- Work the value out without
config.draft_label: fromDraft's own fields, or a constant (agent) - rule
- migration.
backfill_ outside_ row - help
- https://jadpo.
dev/docs/errors/migration. backfill_ outside_ row
Nor a field the same migration adds, which no record already stored has a value for while the backfill runs:
migration { Draft.title: { backfill: "Untitled" } Draft.subheading: { backfill: Draft.title }}
error The backfill for Draft.subheading can't read Draft.title
--> database/migrations/20261020T1401_add_titles/changes.jadpo:6:19
|6 | backfill: Draft.title | ^^^^^^^^^^^ a field this migration adds
- reason
Draft.titleis added by this same migration, so noDraftrecord already stored has a value for it while the backfill runs.- next
- Work the value out from the fields
Drafthad before this migration, or a constant (agent) - rule
- migration.
backfill_ outside_ row - help
- https://jadpo.
dev/docs/errors/migration. backfill_ outside_ row
Markdown for agents: /docs/errors/migration.backfill_outside_row.md.Built from Jadpo main at aee2e8f.