CoachCertifications table
The CoachCertifications table in the FitStack - V2 schema has 13 columns, keyed by Id, with 3 foreign keys to Coaches, Media and Users.
Columns (13)
| Column | Type | Constraints | Description |
|---|---|---|---|
| Id | uuid | primary key, not null | |
| CoachId | uuid | not null, references Coaches.Id | CASCADE. |
| Name | character varying(200) | not null | |
| IssuingBody | character varying(200) | ||
| IssuedOn | date | ||
| ExpiresOn | date | ||
| MediaId | uuid | references Media.Id | v2 FIX: real FK to the scanned certificate. |
| VerifiedByUserId | text | references Users.Id | v2 ADD. |
| VerifiedAt | timestamp with time zone | v2 ADD: null = claimed but unverified. v1 displayed unverified certifications as fact. | |
| CreatedAt | timestamp with time zone | not null | |
| ModifiedAt | timestamp with time zone | ||
| IsDeleted | boolean | not null | |
| DeletedAt | timestamp with time zone |
Indexes (2)
(CoachId)(IX_CoachCertifications_CoachId)(ExpiresOn)(IX_CoachCertifications_ExpiresOn)
Relationships
CoachCertifications.CoachIdreferencesCoaches.IdCoachCertifications.MediaIdreferencesMedia.IdCoachCertifications.VerifiedByUserIdreferencesUsers.Id