AchievementDefinitions table

The AchievementDefinitions table in the FitStack - V2 schema has 16 columns, keyed by Id. 1 column in UserAchievements references it.

**NOT IN THE LIVE DATABASE — dropped 2026-08-04.** Seeded by `Persistence/Seeders/AchievementSeeder.cs` (211 lines, deleted), invoked from Program.cs. Three Hangfire jobs maintained it: AchievementDailyCheckJob, AchievementJobScheduler, AchievementPercentageJob. Restoring this also needs `NotificationType.Achievement` back — it was ordinal 6 and is now a pinned gap (Warning is 7).

Columns (16)

Columns of the AchievementDefinitions table
ColumnTypeConstraintsDescription
Iduuidprimary key, not null
Namecharacter varying(100)not null
Descriptioncharacter varying(500)not null
IconUrlcharacter varying(500)not null
Categorycharacter varying(50)not null`AchievementCategory` as TEXT.
Tiercharacter varying(50)not null`AchievementTier` as TEXT.
MetricTypecharacter varying(100)not null`AchievementMetricType` as TEXT.
ThresholdValuedouble precisionnot null
SortOrderintegernot null
IsActivebooleannot null
EarnedPercentagedouble precisionnot nullDenormalised — share of users holding this. Recomputed by a nightly job.
TotalEarnedCountintegernot nullDenormalised counter.
CreatedAttimestamp with time zonenot null
ModifiedAttimestamp with time zone
IsDeletedbooleannot null
DeletedAttimestamp with time zone

Indexes (2)

  • (Category) (IX_AchievementDefinitions_Category)
  • (MetricType) (IX_AchievementDefinitions_MetricType)

Relationships