Database Schema - jechan6/Spotify-Clone GitHub Wiki
Users:
column name |
data type |
details |
id |
integer |
not null, primary key |
name |
string |
not null |
username |
string |
not null, unique |
img_url |
string |
not null |
password_digest |
string |
not null |
session_token |
string |
not null, unique |
Index: username, session_token, unique
Song:
column name |
data type |
details |
id |
integer |
not null, primary key |
title |
string |
not null |
artist_id |
string |
not null |
album_id |
integer |
null,indexed |
song_url |
string |
not null |
Albums:
column name |
data type |
details |
id |
integer |
not null, primary key |
title |
string |
not null |
artist_id |
string |
not null |
year |
integer |
null,indexed |
image_url |
string |
not null |
FavoriteAlbums:
column name |
data type |
details |
id |
integer |
not null, primary key |
user_id |
integer |
not null indexed |
album_id |
integer |
not null, indexed |
FavoriteArtists:
column name |
data type |
details |
id |
integer |
not null, primary key |
user_id |
integer |
not null indexed |
artist_id |
integer |
not null, indexed |
Artists:
column name |
data type |
details |
id |
integer |
not null, primary key |
title |
string |
not null |
artist_id |
string |
not null |
image_url |
string |
|
Playlist:
column name |
data type |
details |
id |
integer |
not null, primary key |
title |
string |
not null |
creator_id |
integer |
not null |
PlaylistSongs:
column name |
data type |
details |
id |
integer |
not null, primary key |
playlist_id |
integer |
not null |
song_id |
integer |
not null |
Followers:
column name |
data type |
details |
id |
integer |
not null, primary key |
playlist_id |
integer |
not null |
user_id |
integer |
not null |
Features :
column name |
data type |
details |
id |
integer |
not null, primary key |
song_id |
integer |
not null,index |
artist_id |
integer |
not null,index |