Files
HealthLog/prisma/migrations/0470_user_activity_goals/migration.sql
T
Marc-André Bombeck 5eb7caebae feat(activity): add an activity calendar with personal baseline and goals
A week or month of steps, active minutes, workouts by sport and training
load, each day placed against the person's own spread over the 84 days
before the period and each period against the median of the twelve weeks
or six months before it. Optional weekly and monthly goals live on the
account (activity_goals_json), travel with the backup and are cleared by
a data wipe. The calendar sits on the workouts page; the steps page links
to it. Computed server-side without AI.
2026-10-21 21:38:32 +02:00

10 lines
383 B
SQL

-- Optional per-user activity goals for the activity calendar: workouts,
-- active minutes and steps per week, steps per month.
--
-- Nullable, no default, no backfill: null reads as "no goal set", which is
-- every account's state today.
--
-- Reversibility: dropping the column removes the goals; nothing else reads it.
ALTER TABLE "users" ADD COLUMN "activity_goals_json" JSONB;