Database Schema - miguelalvinflores/jazzify GitHub Wiki

DB_Schema

users

Column Name Data Type Details
id integer not null, primary key
user_name string not null, unique
profile_pic_url string
email 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 references artists 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 references albums table
  • user_id references users table
  • artist_id references artists 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 references users 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 references users table
  • track_id references tracks 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 references users table
  • track_id references tracks table