# `MishkaDocument.Resources.Changes.SetSectionLineageId`
[🔗](https://github.com/mishka-group/mishka_document/blob/v0.0.1/lib/mishka_document/resources/__changes/set_section_lineage_id.ex#L5)

Automatically sets section_lineage_id for tracking section versions across workspace versions.

- New sections (no source): section_lineage_id = the section's own id
- Cloned sections (has source): section_lineage_id = source's section_lineage_id, copied as the
  write runs, after its validations. It may name a first section that has since been deleted; a
  first section of another site is refused.
- A section_lineage_id the writer gives is kept, and must name a section of the same site.

Looking up the source and the lineage's first section sees every site, because a pointer into
another site is what is refused. A section that starts its own lineage has it written with the row,
so creating a section is one event in the log, not a create followed by an update nobody made.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
