post_media table
The post_media table in the Social Media Database Schema schema has 10 columns, keyed by id, with 1 foreign key to posts.
Bytes live in object storage. This table holds the pointer and the metadata a client needs to lay out before the file loads.
Columns (10)
| Column | Type | Constraints | Description |
|---|---|---|---|
| id | uuid | primary key | |
| post_id | uuid | not null, references posts.id | |
| type | media_type | not null | |
| url | varchar(500) | not null | |
| thumbnail_url | varchar(500) | ||
| alt_text | varchar(500) | ||
| width | integer | ||
| height | integer | ||
| duration_seconds | integer | ||
| position | smallint | not null |
Indexes (1)
(post_id, position)
Relationships
post_media.post_idreferencesposts.id