UserGoals table

The UserGoals table in the FitStack - V2 schema has 20 columns, keyed by Id, with 1 foreign key to Users.

v1 coaching added `AssignedByCoachId uuid` + `AssignedAt` here with no FK. v2 REMOVES both — coach-assigned goals are rows in `CoachAssignments` (63) with `TargetType = Goal`.

Columns (20)

Columns of the UserGoals table
ColumnTypeConstraintsDescription
Iduuidprimary key, not null
UserIdtextnot null, references Users.IdNo navigation property on the C# side.
GoalTypeintegernot null
Statusintegernot null`GoalStatus`.
MetricTypeintegernot null
Unitintegernot null
Directionintegernot null`TrackingDirection`.
Titletext
Notestext
StartValuenumericnot null
CurrentValuenumericnot null
TargetValuenumericnot null
StartDatetimestamp with time zonenot null
TargetDatetimestamp with time zonenot null
LastProgressUpdatetimestamp with time zone
CompletedAttimestamp with time zone
CreatedAttimestamp with time zonenot null
ModifiedAttimestamp with time zone
IsDeletedbooleannot null
DeletedAttimestamp with time zone

Relationships