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)
| Column | Type | Constraints | Description |
|---|---|---|---|
| Id | uuid | primary key, not null | |
| Name | character varying(100) | not null | |
| Description | character varying(500) | not null | |
| IconUrl | character varying(500) | not null | |
| Category | character varying(50) | not null | `AchievementCategory` as TEXT. |
| Tier | character varying(50) | not null | `AchievementTier` as TEXT. |
| MetricType | character varying(100) | not null | `AchievementMetricType` as TEXT. |
| ThresholdValue | double precision | not null | |
| SortOrder | integer | not null | |
| IsActive | boolean | not null | |
| EarnedPercentage | double precision | not null | Denormalised — share of users holding this. Recomputed by a nightly job. |
| TotalEarnedCount | integer | not null | Denormalised counter. |
| CreatedAt | timestamp with time zone | not null | |
| ModifiedAt | timestamp with time zone | ||
| IsDeleted | boolean | not null | |
| DeletedAt | timestamp with time zone |
Indexes (2)
(Category)(IX_AchievementDefinitions_Category)(MetricType)(IX_AchievementDefinitions_MetricType)
Relationships
UserAchievements.AchievementDefinitionIdreferencesAchievementDefinitions