Database Schema - miguelalvinflores/jazzify GitHub Wiki
users
Column Name | Data Type | Details |
---|---|---|
id | integer | not null, primary key |
user_name | string | not null, unique |
profile_pic_url | string | |
string | not null, indexed, unique | |
hashedPW | string | not null |
created_at | datetime | not null |
updated_at | datetime | not null |
- index on
email, unique : true
artists
Column Name | Data Type | Details |
---|---|---|
id | integer | not null, primary key |
artist_name | string | not null |
created_at | datetime | not null |
updated_at | datetime | not null |
albums
Column Name | Data Type | Details |
---|---|---|
id | integer | not null, primary key |
album_title | text | not null |
artist_id | string | not null, foreign key |
image_url | string | not null |
created_at | datetime | not null |
updated_at | datetime | not null |
artist_id
referencesartists
table
tracks
Column Name | Data Type | Details |
---|---|---|
id | integer | not null, primary key |
song_title | string | not null, unique |
album_id | string | |
image_url | string | |
source_url | string | not null |
artist_id | string | not null, foreign key |
created_at | datetime | not null |
updated_at | datetime | not null |
album_id
referencesalbums
tableuser_id
referencesusers
tableartist_id
referencesartists
table
playlists
Column Name | Data Type | Details |
---|---|---|
id | integer | not null, primary key |
playlist_title | string | not null |
user_id | integer | not null, foreign key |
created_at | datetime | not null |
updated_at | datetime | not null |
user_id
referencesusers
table
playlist_track_joins
Column Name | Data Type | Details |
---|---|---|
id | integer | not null, primary key |
track_id | string | not null, foreign key |
user_id | integer | not null, foreign key |
created_at | datetime | not null |
updated_at | datetime | not null |
user_id
referencesusers
tabletrack_id
referencestracks
table
hearts
Column Name | Data Type | Details |
---|---|---|
id | integer | not null, primary key |
track_id | string | not null, foreign key |
user_id | integer | not null, foreign key |
created_at | datetime | not null |
updated_at | datetime | not null |
user_id
referencesusers
tabletrack_id
referencestracks
table