PhoenixKit.Migrations.Postgres.V115 (phoenix_kit v1.7.111)

Copy Markdown View Source

V115: phoenix_kit_annotations — drawn-on-image annotations created via the Etcher overlay layer.

Stores user-drawn shapes (rectangle, circle, polygon, freehand) tied to a phoenix_kit_files row, in image-pixel coordinates. The discussion thread for an annotation lives in phoenix_kit_comments anchored to the file (resource_type = "file", resource_uuid = file_uuid) with metadata.annotation_uuid carrying the back-reference — no comment_uuid column on annotations is needed; the linkage is one-directional from the comment side, and annotation-rooted comments show up in the file's main thread alongside non-annotated ones.

Cascade-on-delete on file_uuid: deleting a file removes its annotations (and the comments module's own cascade handles their discussion threads). creator_uuid is nullable + ON DELETE SET NULL so user removals don't take their annotations down with them.

Indexes:

  • (file_uuid) — per-file listing in the MediaBrowser modal.
  • (creator_uuid) — author lookups, partial on NOT NULL.

Geometry

All shape coordinates live in image pixels:

  • rectangle: {x, y, w, h}
  • circle: {cx, cy, r}
  • polygon: {points: [[x, y], ...]}
  • freehand: {points: [[x, y], ...]}

Fresco's pan/zoom rescales them for free at render time.

Summary

Functions

down(opts)

up(opts)