-
Notifications
You must be signed in to change notification settings - Fork 1
Schema
Henry Pan edited this page Mar 30, 2021
·
5 revisions
| column name | data type | details |
|---|---|---|
id |
integer | not null, primary key |
username |
string | not null, indexed, unique |
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
email, unique: true - index on
session_token, unique: true
| column name | data type | details |
|---|---|---|
id |
integer | not null, primary key |
title |
string | not null, indexed |
description |
text | optional |
plays |
integer | not null, default: 0 |
uploader_id |
integer | not null, indexed, foreign key |
created_at |
datetime | not null |
updated_at |
datetime | not null |
-
uploader_idreferencesusers - index on
title - index on
uploader_id - index on
[:title, :uploader_id], unique: true
| column name | data type | details |
|---|---|---|
id |
integer | not null, primary key |
comment_body |
text | not null |
commenter_id |
integer | not null, indexed, foreign key |
track_id |
integer | not null, indexed, foreign key |
created_at |
datetime | not null |
updated_at |
datetime | not null |
-
commenter_idreferencesusers -
track_idreferencestracks - index on
commenter_id - index on
track_id