Skip to main content

Activities

activities, activity_logs, and activity_images.
2 min read

activities#

ColumnNotes
profile_id / created_by
assigneesTable activity_assignees (N); API assignedTo: string[]
name
start_time / end_timeTEXT (template local time)
description / color / image
current_streak / longest_streak / completion_rateStats synced on log write; reads re-derive them from activity_logs
kind / auto_complete_mode
visibilitymembers | subscribers | followers | public. Default members. Public catalog: /@handle/activities/:id for habits only (no logs, streaks, or assignees).
recurrence fieldstype, interval, unit, weekdays JSONB, paused
weekday_time_slotsJSONB
email/agenda reminder fieldsoffsets, job ids, occurrence
soft delete

activity_logs#

Occurrences by date:

ColumnNotes
activity_id
dateTIMESTAMPTZ
completed
canceled_at / cancellation_reason
soft delete

Only activities with kind = habit accept logs. The API rejects completions and cancellations for kind = block. It also rejects dates before the creation day; those invalid historical logs are repaired in migration 000038.

POST /:activityId/reset-history (habits only) soft-deletes all activity_logs for the habit, sets current_streak / longest_streak / completion_rate to 0, and updates activities.created_at to the reset time so the history window matches a newly created habit.

activity_images#

Same blob pattern as task_images: store, pathname, etag, position, soft delete.

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