This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
User-submitted content reports with status workflow (open/acknowledged/resolved/dismissed)
SearchLog
Query logging for popular searches feature (D025)
PipelineRun
Pipeline execution tracking per video with status and trigger type
PipelineEvent
Granular pipeline stage events with token counts and JSONB payload
Enums
Enum
Values
ContentType
tutorial, tip, exploration, walkthrough
ProcessingStatus
queued, in_progress, complete, errored, revoked
KeyMomentContentType
technique, concept, workflow, reference
SourceQuality
high, medium, low
RelationshipType
related, prerequisite, builds_on
ReportType
inaccuracy, missing_info, offensive, other
ReportStatus
open, acknowledged, resolved, dismissed
PipelineRunStatus
pending, running, completed, failed, revoked
PipelineRunTrigger
auto, manual, retrigger, clean_retrigger
UserRole
admin, creator
ConsentField
kb_inclusion, training_usage, public_display
HighlightStatus
candidate, approved, rejected (M021/S04)
ChapterStatus
draft, approved, hidden (M021/S06)
FormatPreset
vertical, square, horizontal (M023/S03)
ShortStatus
pending, processing, complete, failed (M023/S03)
Migrations
Migration
Description
019
Add highlight_candidates table
021
Add trim_start/trim_end to highlight_candidates (M022/S01)
022
Add creator_follows table (M022/S02)
023
Add personality_profile JSONB to creators (M022/S06)
024
Add posts and post_attachments tables (M023/S01)
025
Add generated_shorts table with FormatPreset and ShortStatus enums (M023/S03)
026
Add share_token to generated_shorts + backfill existing complete shorts + unique index (M024/S01)
027
Add captions_enabled boolean to generated_shorts (M024/S04)
028
Add shorts_template JSONB to creators (M024/S04)
Schema Notes
body_sections_format discriminator enables v1/v2 format coexistence (D024)
topic_category casing is inconsistent across records (e.g., "Sound design" vs "Sound Design") — known data quality issue
Stage 4 classification data (per-moment topic_tags) stored in Redis with 24h TTL, not DB columns
Timestamp convention:datetime.now(timezone.utc).replace(tzinfo=None) — asyncpg rejects timezone-aware datetimes for TIMESTAMP WITHOUT TIME ZONE columns (D002)
User passwords are stored as bcrypt hashes via bcrypt.hashpw()
Consent audit uses version numbers assigned in application code (max(version) + 1 per video_consent_id)
M025 Models
EmailDigestLog (M025/S01)
Field
Type
Notes
id
UUID PK
user_id
FK -> User
content_summary
JSONB
Digest content grouped by creator
sent_at
Timestamp
Tracks every successful email send for deduplication. The digest task checks MAX(sent_at) per user to find new content since last send.
ChatUsageLog (M025/S04)
Field
Type
Notes
id
UUID PK
user_id
FK -> User
Nullable (anonymous users)
client_ip
String
For IP-based rate limiting
creator_slug
String
Nullable
query
Text
User's chat query
prompt_tokens
Integer
completion_tokens
Integer
total_tokens
Integer
cascade_tier
String
creator / domain / global / none
model
String
Actual model used (primary or fallback)
latency_ms
Integer
End-to-end response time
created_at
Timestamp
Indexed for time-range aggregation
Non-blocking INSERT -- errors logged but never block the SSE response.