UserAchievements table

The UserAchievements table in the FitStack - V2 schema has 10 columns, keyed by Id, with 2 foreign keys to Users and AchievementDefinitions.

NOT IN THE LIVE DATABASE. The FK constraint name was truncated by Postgres to `FK_UserAchievements_AchievementDefinitions_AchievementDefiniti~`.

Columns (10)

Columns of the UserAchievements table
ColumnTypeConstraintsDescription
Iduuidprimary key, not null
UserIdcharacter varying(450)not null, references Users.Id
AchievementDefinitionIduuidnot null, references AchievementDefinitions.IdCASCADE.
EarnedAttimestamp with time zonenot null
MetricValueAtEarningdouble precisionnot null
IsSeenbooleannot null
CreatedAttimestamp with time zonenot null
ModifiedAttimestamp with time zone
IsDeletedbooleannot null
DeletedAttimestamp with time zone

Indexes (3)

  • (UserId, AchievementDefinitionId) unique (IX_UserAchievements_UserId_AchievementDefinitionId)
  • (UserId) (IX_UserAchievements_UserId)
  • (AchievementDefinitionId) (IX_UserAchievements_AchievementDefinitionId)

Relationships