Created
December 27, 2024 02:48
-
-
Save tbbooher/556005e792199fde4e843ac6f7feb52a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\d workout_data_points | |
Table "public.workout_data_points" | |
Column | Type | Collation | Nullable | Default | |
--------------+-----------------------------+-----------+----------+------------------------------------------------- | |
id | integer | | not null | nextval('workout_data_points_id_seq'::regclass) | |
workout_id | bigint | | not null | | |
timestamp | timestamp without time zone | | not null | | |
elapsed_time | double precision | | | | |
distance | double precision | | | | |
speed | double precision | | | | |
heartrate | double precision | | | | |
cadence | double precision | | | | |
altitude | double precision | | | | |
latitude | double precision | | | | |
longitude | double precision | | | | |
power | integer | | | | |
Indexes: | |
"workout_data_points_pkey" PRIMARY KEY, btree (workout_id) | |
Foreign-key constraints: | |
"workout_data_points_workout_id_fkey" FOREIGN KEY (workout_id) REFERENCES workouts(workout_id) ON DELETE CASCADE | |
postgres=> \d workouts | |
Table "public.workouts" | |
Column | Type | Collation | Nullable | Default | |
--------------------+-----------------------------+-----------+----------+-------------------------------------- | |
id | integer | | not null | nextval('workouts_id_seq'::regclass) | |
workout_id | bigint | | not null | | |
start_time | timestamp without time zone | | | | |
end_time | timestamp without time zone | | | | |
duration | double precision | | | | |
distance | double precision | | | | |
average_speed | double precision | | | | |
max_speed | double precision | | | | |
average_heart_rate | double precision | | | | |
max_heart_rate | double precision | | | | |
cadence | double precision | | | | |
elevation_gain | double precision | | | | |
calories | double precision | | | | |
sport_type | character varying(50) | | | | |
raw_data | jsonb | | | | |
created_at | timestamp without time zone | | | CURRENT_TIMESTAMP | |
name | character varying(255) | | | | |
user_id | integer | | | | |
Indexes: | |
"workouts_pkey" PRIMARY KEY, btree (workout_id) | |
"idx_workouts_user_id" btree (user_id) | |
"workouts_workout_id_key" UNIQUE CONSTRAINT, btree (workout_id) | |
Foreign-key constraints: | |
"workouts_user_id_fkey" FOREIGN KEY (user_id) REFERENCES users(id) | |
Referenced by: | |
TABLE "workout_data_points" CONSTRAINT "workout_data_points_workout_id_fkey" FOREIGN KEY (workout_id) REFERENCES workouts(workout_id) ON DELETE CASCADE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment