Media table

The Media table in the FitStack - V2 schema has 10 columns, keyed by Id, with 1 foreign key to Users. 23 columns in Trainers, Courses, Brands, GymEquipmentUnitPhotos and 15 more reference it.

Single media table for the whole product — avatars, post images, product photos, certification scans. Many referencing columns (`HeroMediaId`, `MediaId` on coach certifications, `ImageId` on Muscles) are loose `uuid` with no FK; v2 makes the coaching ones real FKs.

Columns (10)

Columns of the Media table
ColumnTypeConstraintsDescription
Iduuidprimary key, not null
Urltext
Buckettext
FileNametext
ImageTypeintegernot null
CreatedByIdtextreferences Users.Id
CreatedAttimestamp with time zonenot null
ModifiedAttimestamp with time zone
IsDeletedbooleannot null
DeletedAttimestamp with time zone

Indexes (1)

  • (CreatedById) (IX_Media_CreatedById)

Relationships