Database Schema - adamLovettApps/JamOut GitHub Wiki
Tables
users
Column Name |
Data Type |
Constraints |
id |
int |
primary key, not null |
username |
string |
unique, not null |
hashedPassword |
string |
not null |
email |
string |
unique, not null |
profilePhoto |
string |
not null |
city |
string |
not null |
state |
string |
not null |
zip |
int |
not null |
bio |
text |
|
location |
geography |
not null |
usergenres
Column Name |
Data Type |
Constraints |
id |
int |
primary key, not null |
userId |
int |
foreign key, not null |
genreId |
int |
foreign key, not null |
genres
Column Name |
Data Type |
Constraints |
id |
int |
primary key, not null |
genre |
string |
unique, not null |
userinstruments
Column Name |
Data Type |
Constraints |
id |
int |
primary key, not null |
userId |
int |
foreign key, not null |
instrumentId |
int |
foreign key, not null |
instruments
Column Name |
Data Type |
Constraints |
id |
int |
primary key, not null |
instrument |
string |
unique, not null |
songs
Column Name |
Data Type |
Constraints |
id |
int |
primary key, not null |
userId |
int |
foreign key, not null |
song |
string |
not null |
title |
string |
not null |
conversations
Column Name |
Data Type |
Constraints |
id |
int |
primary key, not null |
userId |
int |
foreign key, not null |
userId2 |
int |
foreign key, not null |
messages
Column Name |
Data Type |
Constraints |
id |
int |
primary key, not null |
conversationId |
int |
foreign key, not null |
userIdTo |
int |
foreign key, not null |
userIdFrom |
int |
foreign key, not null |
message |
string |
not null |
likes
Column Name |
Data Type |
Constraints |
id |
int |
primary key, not null |
userId |
int |
foreign key, not null |
userId2 |
int |
foreign key, not null |