Demo sandbox. Synthetic data, private to your browser, nothing persists. Edit freely.
↺ Reset demo
Workbench
Lab
Query your raw training data directly — a read-only, SELECT-only SQL console over your local SQLite database, with a live schema map.
Not available on this deployment
The SQL console is for local SQLite installs. This instance isn't running on SQLite.
Every table and its foreign-key relationships, generated live from the current schema (PK = primary key, FK = foreign key). Scroll to pan.
erDiagram
activities {
int activity_id PK
int athlete_id FK
int strava_id
str sport_type
date date
datetime start_time
int duration_seconds
int moving_seconds
float distance_meters
float elevation_meters
float avg_power_watts
float norm_power_watts
float avg_hr_bpm
float max_hr_bpm
int total_work_kj
float tss
str tss_method
float intensity_factor
float athlete_age_at_date
json time_in_zone
str name
bool trainer
bool raw_streams_fetched
bool deleted
str strava_url
str notes
str route_polyline
str laps
bool laps_fetched
int rpe
str completion_status
datetime created_at
datetime updated_at
}
aero_setups {
int setup_id PK
int athlete_id FK
str name
str description
float bike_weight_kg
float adopted_cda
float adopted_crr
int adopted_test_id
bool is_default
datetime created_at
datetime updated_at
}
aero_tests {
int test_id PK
int athlete_id FK
int activity_id FK
int setup_id FK
str label
int seg_start_idx
int seg_end_idx
float est_cda
float est_crr
float mass_kg
float rho
float wind_speed_ms
float wind_dir_deg
float closure_err
json conditioning
datetime created_at
}
athlete_profile {
int athlete_id PK
str name
date dob
str sex
float weight_kg
float height_cm
int resting_hr
int hr_max
int hr_max_observed
int current_ftp
float maintenance_tss_default
float tsb_fatigued_threshold
float tsb_overreached_threshold
int max_intensity_days
float max_ctl_ramp
str units_distance
str units_temperature
str theme
str timezone
datetime created_at
datetime updated_at
}
availability_pattern {
int pattern_id PK
int athlete_id FK
str name
int day_of_week
float available_hours_ceiling
str preferred_window
bool is_active
datetime created_at
}
constraint_state {
int state_id PK
int athlete_id FK
str iso_week
int hard_sessions_this_week
json zone_tss_spent_this_week
json stimulus_in_flight_log
float rolling_monotony
float rolling_strain
json week_caps
float ctl_ramp_used
datetime computed_at
}
daily_context {
int context_id PK
int athlete_id FK
date date
float available_hours_ceiling
str context_notes
bool is_rest_day_forced
str override_reason
datetime created_at
}
daily_log {
int log_id PK
int athlete_id FK
date date
int prescribed_workout_id FK
int activity_id FK
str completion_status
float completion_pct
str non_completion_reason
bool non_completion_is_context_only
str prescribed_system
json delivered_systems
float delivery_score
str reconciliation_verdict
int rpe_prescribed
int rpe_actual
str subjective_notes
str coach_notes
datetime created_at
}
demand_profile {
int profile_id PK
str scope
str event_type
int event_id FK
int based_on_template_id FK
json power_duration_targets
json durability
json repeatability
float duration_hours
int total_kj_estimate
json ancillary
json target_ctl
str intensity_metric
str notes
datetime created_at
}
durability_cache {
int durability_id PK
int activity_id FK
str window
int duration_s
int kj_threshold
int post_k_best_power
int fresh_best_power
float retention
str source
date date
datetime computed_at
}
effort_points {
int effort_id PK
int activity_id FK
int effort_seq
int effort_duration_s
int effort_power_w
date effort_date
float maximality_likelihood
bool is_interval_completion
bool is_race_effort
int cumulative_kj_at_start
float age_at_effort
int ftp_at_date
datetime created_at
}
events {
int event_id PK
int athlete_id FK
str name
date date
str sport
str event_type
str priority
str b_race_mode
float race_day_tsb_low
float race_day_tsb_high
float distance_km
float elevation_m
int taper_days
str notes
datetime created_at
}
ftp_history {
int ftp_id PK
int athlete_id FK
date date
int ftp_watts
str source
float confidence
str notes
datetime created_at
}
intervals_credentials {
int athlete_id PK
blob api_key
str intervals_athlete_id
str athlete_name
bool auto_sync
datetime last_synced_at
datetime created_at
datetime updated_at
}
mmp_cache {
int mmp_id PK
int activity_id FK
str window
int duration_seconds
int power_watts
date date
datetime computed_at
}
model_metadata {
str model_id PK
int version
datetime trained_at
int n_training_rows
json feature_names
json hyperparameters
json validation_scores
str source_data_hash
bool fallback_active
int activation_threshold
json evidence_quality
str artifact_path
datetime updated_at
}
planned_workout {
int planned_id PK
int athlete_id FK
date date
int workout_id FK
float forecast_tss
json structured_steps
str title
int duration_min
str energy_system
str source
str status
str planned_time_of_day
datetime created_at
}
power_profile_snapshots {
int snapshot_id PK
int athlete_id FK
date snapshot_date
str window
int p5s
int p30s
int p1min
int p5min
int p20min
int p60min
int ftp_estimated
float weight_kg_at_date
float w_per_kg_ftp
datetime computed_at
}
power_streams {
int activity_id PK
int n_samples
int sample_rate_hz
json channels_present
int format_version
blob stream_blob
int compressed_bytes
blob gps_blob
datetime created_at
}
recommendation_cache {
int cache_id PK
int athlete_id FK
date date
json ranked_candidates
int selected_workout_id FK
json primary_forward_pmc_impact
str inputs_hash
datetime computed_at
}
strava_tokens {
int athlete_id PK
blob access_token
blob refresh_token
datetime expires_at
str scope
datetime last_sync_at
datetime created_at
datetime updated_at
}
training_load {
date date PK
int athlete_id FK
float ctl
float atl
float tsb
float daily_tss_raw
float daily_tss_weighted
json sport_weight_audit
datetime computed_at
}
weight_history {
int weight_id PK
int athlete_id FK
date date
float weight_kg
str source
datetime created_at
}
wellness_logs {
int log_id PK
int athlete_id FK
date date
float sleep_hours
int sleep_quality
int mood
int fatigue
int soreness
int motivation
bool sick
str notes
datetime created_at
}
workout_library {
int workout_id PK
str name
str sport
str energy_system
str description
json structured_steps
int duration_min_minutes
int duration_max_minutes
int tss_min
int tss_max
int difficulty
json tags
str source
datetime created_at
}
athlete_profile ||--o{ activities : athlete_id
athlete_profile ||--o{ aero_setups : athlete_id
activities ||--o{ aero_tests : activity_id
athlete_profile ||--o{ aero_tests : athlete_id
aero_setups ||--o{ aero_tests : setup_id
athlete_profile ||--o{ availability_pattern : athlete_id
athlete_profile ||--o{ constraint_state : athlete_id
athlete_profile ||--o{ daily_context : athlete_id
activities ||--o{ daily_log : activity_id
athlete_profile ||--o{ daily_log : athlete_id
workout_library ||--o{ daily_log : prescribed_workout_id
events ||--o{ demand_profile : event_id
demand_profile ||--o{ demand_profile : based_on_template_id
activities ||--o{ durability_cache : activity_id
activities ||--o{ effort_points : activity_id
athlete_profile ||--o{ events : athlete_id
athlete_profile ||--o{ ftp_history : athlete_id
athlete_profile ||--o{ intervals_credentials : athlete_id
activities ||--o{ mmp_cache : activity_id
workout_library ||--o{ planned_workout : workout_id
athlete_profile ||--o{ planned_workout : athlete_id
athlete_profile ||--o{ power_profile_snapshots : athlete_id
activities ||--o{ power_streams : activity_id
athlete_profile ||--o{ recommendation_cache : athlete_id
workout_library ||--o{ recommendation_cache : selected_workout_id
athlete_profile ||--o{ strava_tokens : athlete_id
athlete_profile ||--o{ training_load : athlete_id
athlete_profile ||--o{ weight_history : athlete_id
athlete_profile ||--o{ wellness_logs : athlete_id