Schema - HelloPancake/Groove GitHub Wiki
users
| column name | data type | details |
|---|---|---|
id |
integer | not null, primary key |
username |
string | not null, indexed |
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 |
posts
| column name | data type | details |
|---|---|---|
id |
integer | not null, primary key |
audio_url |
string | |
image_url |
string | |
user_id |
integer | not null, indexed |
body |
string | |
created_at |
datetime | not null |
updated_at |
datetime | not null |
user_id references users
notes
| column name | data type | details |
|---|---|---|
id |
integer | not null, primary key |
body |
string | not null |
user_id |
integer | not null, indexed |
parent_note_id |
integer | optional |
created_at |
datetime | not null |
updated_at |
datetime | not null |
user_id references users
parent_note_id references notes
likes
| column name | data type | details |
|---|---|---|
id |
integer | not null, primary key |
user_id |
integer | not null, indexed |
post_id |
integer | not null, indexed |
created_at |
datetime | not null |
updated_at |
datetime | not null |
user_id references users
post_id references notes
follows
| column name | data type | details |
|---|---|---|
id |
integer | not null, primary key |
follower_id |
integer | not null, indexed |
followee_id |
integer | not null, indexed |
created_at |
datetime | not null |
updated_at |
datetime | not null |
follower_id references users
followee_id references users