-
Notifications
You must be signed in to change notification settings - Fork 0
Schema
Erick Santos edited this page Apr 30, 2020
·
8 revisions
column name | datatype | details |
---|---|---|
id |
integer | not null, primary key |
username |
string | not null, indexed, unique |
first_name |
string | not null, indexed |
last_name |
string | not null, indexed |
email |
string | not null, indexed, unique |
bio |
text | |
age |
string | not null |
gender |
string | not null |
language |
string | not null |
region |
string | not null |
session_token |
string | not null, indexed, unique |
password_digest |
string | not null |
created_at |
datetime | not null |
updated_at |
datetime | not null |
- index on
username, unique: true
- index on
email, unique: true
- index on
session_token, unique: true
- index on
first_name
- index on
last_name
column name | datatype | details |
---|---|---|
id |
integer | not null, primary key |
follower_id |
integer | not null, indexed, foreign key |
followed_id |
integer | not null, indexed, foreign key |
created_at |
datetime | not null |
updated_at |
datetime | not null |
-
follower_id
referencesusers
-
followed_id
referencesusers
- index on
[:follower_id, :followed_id]
column name | datatype | details |
---|---|---|
id |
integer | not null, primary key |
user_id |
integer | not null, indexed, foreign key |
name |
string | not null, indexed |
description |
text | |
date_start |
datetime | |
date_end |
datetime | |
created_at |
datetime | not null |
updated_at |
datetime | not null |
-
user_id
referencesusers
- index on
[:user_id, :name], unique: true
column name | datatype | details |
---|---|---|
id |
integer | not null, primary key |
user_id |
integer | not null, indexed, foreign key |
title |
string | not null, indexed |
description |
text | |
link |
text | |
created_at |
datetime | not null |
updated_at |
datetime | not null |
-
user_id
referencesusers
- index on
:user_id
- index on
:title
column name | datatype | details |
---|---|---|
id |
integer | not null, primary key |
board_id |
integer | not null, indexed, foreign key |
pin_id |
integer | not null, indexed, foreign key |
created_at |
datetime | not null |
updated_at |
datetime | not null |
-
board_id
referencesboards
-
pin_id
referencespins
- index on
[:board_id, :pin_id], unique: true
column name | datatype | details |
---|---|---|
id |
integer | not null, primary key |
user_id |
integer | not null, indexed, foreign key |
pin_id |
integer | not null, indexed, foreign key |
content |
text | not null |
created_at |
datetime | not null |
updated_at |
datetime | not null |
-
user_id
referencesusers
-
pin_id
referencespins
- index on
[:user_id, :pin_id]