Skip to main content

Goals

goals, goal_milestones, goal_links, goal_images, and vision boards tables.
3 min read

goals#

ColumnNotes
profile_id / user_idGoal author (shared in the profile)
title / description
statusDefault active
progress_modeDefault manual
manual_progress_percent
start_date_key / target_date_keyLocal days
visibilitymembers | subscribers | followers | public. Default members. Public catalog: /@handle/goals/:id.
soft delete

Indexes by profile and (profile, user, updated).

goal_milestones#

ColumnNotes
goal_id / profile_id / user_id
title
completed / completed_at
positionOrder

Polymorphic link:

ColumnNotes
link_typeLinked entity type
entity_idTEXT
revisionOptimistic concurrency for AI undo (000098)

Unique (goal_id, link_type, entity_id).

Optional display grouping for an existing goal link (000098). One milestone per link; deleting the link or milestone cascades the association. Does not alter linked progress math.

ColumnNotes
milestone_id / goal_link_idComposite PK
revisionAssociation revision
created_byUser who created the association

goal_images#

Same blob pattern as activity_images: store, pathname, etag, position, soft delete. One active image per goal (an attach replaces the previous one).

Goals are unlimited for customers. Private abuse safeguards may return CAPACITY_GUARD_REACHED.

vision_boards#

Source: 000058_vision_boards.up.sql. Visual collages in the Goals app.

ColumnNotes
profile_id / user_idAuthor (shared in the profile)
title / intentionName and intention
statusactive | archived
is_favoritePersonal favorite
background_kindcolor | image
background_valuePreset (paper, linen, …) or URL
canvas_width / canvas_heightVirtual canvas (default 1600×1000)
visibilitymembers | subscribers | followers | public. Default members. Public catalog: /@handle/boards/:id. Linked goals are filtered to the viewer's allowlist.
soft delete

Index by profile + updated_at.

vision_board_items#

ColumnNotes
board_id / profile_id / user_id
item_typeimage | quote | note | goal
title / body / attributionText by type
goal_idLinked goal (ON DELETE SET NULL)
image_blob_url / image_blob_pathnamePrivate blob
pos_x / pos_y / width / height / rotation / z_indexCollage layout
stylePresentation JSONB
soft delete

Board ↔ goal link (PRIMARY KEY (board_id, goal_id)). ON DELETE CASCADE on both ends.

Domain limits (not plan limits): 50 boards per profile, 80 items per board.