UserProfiles table
The UserProfiles table in the FitStack - V2 schema has 22 columns, keyed by Id, with 2 foreign keys to Media. 1 column in Users references it.
The five inline `*Url` columns duplicate what SocialTags models properly. v2 should pick one; keeping both guarantees they disagree.
Columns (22)
| Column | Type | Constraints | Description |
|---|---|---|---|
| Id | uuid | primary key, not null | |
| UserId | text | not null | 1:1, CASCADE. Principal side is Users. |
| Bio | text | not null | |
| IsPublic | boolean | not null | |
| IsVerified | boolean | not null | |
| FollowersCount | integer | not null | Denormalised counter — must be recomputed if Followings is edited directly. |
| FollowingCount | integer | not null | Denormalised counter. |
| PostsCount | integer | not null | Denormalised counter. |
| ProfilePictureId | uuid | references Media.Id | |
| CoverPhotoId | uuid | references Media.Id | |
| FirstName | text | ||
| LastName | text | ||
| DisplayName | text | ||
| WebsiteUrl | text | ||
| YoutubeUrl | text | ||
| InstagramUrl | text | ||
| TwitterUrl | text | ||
| TikTokUrl | text | ||
| CreatedAt | timestamp with time zone | not null | |
| ModifiedAt | timestamp with time zone | ||
| IsDeleted | boolean | not null | |
| DeletedAt | timestamp with time zone |
Indexes (3)
(ProfilePictureId)(IX_UserProfiles_ProfilePictureId)(CoverPhotoId)(IX_UserProfiles_CoverPhotoId)(DisplayName)(IX_UserProfiles_DisplayName_trgm)