Database Schema - owenshaupt/Candidpop GitHub Wiki
users
Column Name | Data Type | Details |
---|---|---|
id |
integer | not null, primary key |
username |
string | not null, unique, indexed |
first_name |
string | not null |
last_name |
string | not null |
email |
string | not null, unique |
location |
string | not null |
password_digest |
string | not null |
session_token |
string | not null, unique, indexed |
created_at |
datetime | not null |
updated_at |
datetime | not null |
items
Column Name | Data Type | Details |
---|---|---|
id |
integer | not null, primary key |
seller_id |
integer | not null, foreign key |
description |
text | not null, indexed |
price |
float | not null |
sold |
boolean | not null |
created_at |
datetime | not null |
updated_at |
datetime | not null |
seller_id
references a user from theusers
follows
Column Name | Data Type | Details |
---|---|---|
id |
integer | not null, primary key |
followee_id |
integer | not null, foreign key |
follower_id |
integer | not null, foreign key |
followee_id
andfollower_id
both represent a user from theusers
table.