# `Hyper.Img.Db.ImageLayer`
[🔗](https://github.com/harmont-dev/hyper/blob/main/lib/hyper/img/db/image_layer.ex#L1)

One rung of an image's assembly chain. `position` 0 is the base blob; ascending
positions are deltas applied on top (each a dm-snapshot COW store over the layer
below). Selecting all rows for an image ordered by `position` yields exactly the
ordered blob list and params needed to emit the dmsetup tables.

Insert-only: chains are never edited, only created. The reverse index on
`blob_id` answers "which images reference this blob" for the delete check, and
the FK's ON DELETE RESTRICT enforces "can't drop a blob a layer still needs."

# `changeset`

---

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