-
Notifications
You must be signed in to change notification settings - Fork 8
Schema
Americo edited this page Apr 11, 2018
·
23 revisions
column name | data type | details |
---|---|---|
id | integer | not null, primary key |
username | string | not null, indexed, unique |
password_digest | string | not null |
session_token | string | not null, indexed, unique |
first_name | string | not null |
last_name | string | not null |
column name | data type | details |
---|---|---|
id | integer | not null, primary key |
title | string | not null |
user_id | integer | not null, foreign key (references users), indexed |
polyline | text | not null (enconded polyline from google) |
big_image_url | text | not null (maps static api url) |
distance | float | not null (in miles, two decimal digits) |
elevation | float | not null (in feet, no decimals) |
duration | integer | not null (in seconds) |
sport | string | not null (in seconds) |
start_datetime | timestampz | not null |
column name | data type | details |
---|---|---|
id | integer | not null, primary key |
name | string | not null |
description | text | not null |
author_id | integer | not null, foreign key (references users), indexed |
polyline | text | not null (enconded polyline from google) |
image_url | text | not null (maps static api url) |
big_image_url | text | not null (maps static api url) |
distance | float | not null (in miles, two decimal digits) |
elevation | float | not null (in feet, no decimals) |
duration | integer | not null (in seconds) |
sport | string | not null (in seconds) |
column name | data type | details |
---|---|---|
id | integer | not null, primary key |
body | text | not null |
commenter_id | integer | not null, foreign key (references users), indexed |
activity_id | integer | not null, foreign key (references activities), indexed |
column name | data type | details |
---|---|---|
id | integer | not null, primary key |
liker_id | integer | not null, foreign key (references users), indexed |
activity_id | integer | not null, foreign key (references activities), indexed |
column name | data type | details |
---|---|---|
id | integer | not null, primary key |
follower_id | integer | not null, foreign key (references users), indexed |
followee_id | integer | not null, foreign key (references users), indexed |
column name | data type | details |
---|---|---|
id | integer | not null, primary key |
url | string | not null |
user_id | integer | foreign key (references users), indexed, unique |
route_id | integer | foreign key (references routes), indexed, unique |
activity_id | integer | foreign key (references activities), indexed |
|