schema - nrice95/Stride GitHub Wiki
Database Schema
athletes
column name | data type | details |
---|---|---|
id |
integer | not null, primary key |
username |
string | not null, indexed |
email |
string | not null, indexed, unique |
password_digest |
string | not null |
session_token |
string | not null, indexed, unique |
created_at |
datetime | not null |
updated_at |
datetime | not null |
- index on
username, unique: true
- index on
session_token, unique: true
routes
column name | data type | details |
---|---|---|
id |
integer | not null, primary key |
activity_id |
integer | not null, foreign key |
route_map_data |
polyline | not null, |
created_at |
datetime | not null |
updated_at |
datetime | not null |
activities
column name | data type | details |
---|---|---|
id |
integer | not null, primary key |
athlete_id |
integer | not null, foreign key |
route_id |
integer | not null, foreign key |
created_at |
datetime | not null |
updated_at |
datetime | not null |
activity stats
column name | data type | details |
---|---|---|
id |
integer | not null, primary key |
activity_id |
integer | not null, foreign key |
description |
string | not null |
title |
string | not null |
sport |
string | not null |
distance |
float | not null |
duration_hours |
integer | not null |
duration_minutes |
integer | not null |
duration_seconds |
integer | not null |
elevation |
integer | |
pace |
float | not null |
run_type |
string | |
created_at |
datetime | not null |
updated_at |
datetime | not null |