-
Notifications
You must be signed in to change notification settings - Fork 0
Schema
Andrew (AJ) Ansel edited this page Sep 19, 2017
·
5 revisions
| column name | data type | details |
|---|---|---|
id |
integer | not null, primary key |
name |
string | not null, indexed |
username |
string | not null, indexed, unique |
email |
string | not null, indexed, unique |
img_url |
string | not null |
password_digest |
string | not null |
session_token |
string | not null, indexed, unique |
created_at |
datetime | not null |
updated_at |
datetime | not null |
| column name | data type | details |
|---|---|---|
id |
integer | not null, primary key |
body |
string | not null |
author_id |
integer | not null, indexed, foreign key |
song_id |
integer | not null, indexed, foreign key |
created_at |
datetime | not null |
updated_at |
datetime | not null |
-
author_idreferencesusers -
song_idreferencessongs
| column name | data type | details |
|---|---|---|
id |
integer | not null, primary key |
user_id |
integer | not null, indexed, foreign key |
post_id |
integer | not null, indexed, foreign key |
created_at |
datetime | not null |
updated_at |
datetime | not null |
-
user_idreferencesusers -
post_idreferencesposts - index on
[:post_id, :user_id], unique: true
| column name | data type | details |
|---|---|---|
id |
integer | not null, primary key |
followee_id |
integer | not null, indexed, foreign key |
follower_id |
integer | not null, indexed, foreign key |
created_at |
datetime | not null |
updated_at |
datetime | not null |
-
follower_idreferencesusers -
followee_idreferencesusers - index on
[:follower_id, :followee_id], unique: true
| column name | data type | details |
|---|---|---|
id |
integer | not null, primary key |
title |
string | not null |
lyrics(aka body) |
text | not null |
img_url |
string | not null |
artist_id |
integer | not null, indexed, foreign key |
album_id |
integer | not null, indexed, foreign key |
created_at |
datetime | not null |
updated_at |
datetime | not null |
-
artist_idreferencesartists -
album_idreferencesalbums
| column name | data type | details |
|---|---|---|
id |
integer | not null, primary key |
name |
string | not null |
img_url |
string | not null |
created_at |
datetime | not null |
updated_at |
datetime | not null |
| column name | data type | details |
|---|---|---|
id |
integer | not null, primary key |
title |
string | not null |
img_url |
string | not null |
artist_id |
integer | not null, indexed, foreign key |
created_at |
datetime | not null |
updated_at |
datetime | not null |
-
artist_idreferencesartists