Database Schema - nishinelson/solo-project GitHub Wiki

Main Feature Tables
Users
Column Name |
Data Type |
Details |
id |
int |
primary key, not null |
firstName |
string |
not null |
lastName |
string |
not null |
userName |
string |
not null, unique |
avatarUrl |
string |
|
email |
string |
not null, unique |
hashedPassword |
string |
not null |
createdAt |
timestamp |
not null |
updatedAt |
timestamp |
not null |
Groups
Column Name |
Data Type |
Details |
id |
int |
primary key, not null |
name |
text |
not null |
about |
text |
not null |
imageUrl |
text |
not null |
userId |
int |
not null, foreign key |
createdAt |
timestamp |
not null |
updatedAt |
timestamp |
not null |
userId
references users
table
Members
Column Name |
Data Type |
Details |
userId |
int |
not null, foreign key |
groupId |
int |
not null, foreign key |
createdAt |
timestamp |
not null |
updatedAt |
timestamp |
not null |
*userId
references users
table
*groupId
references group
table
Events
Column Name |
Data Type |
Details |
id |
int |
primary key, not null |
name |
text |
not null |
details |
text |
not null |
imageUrl |
text |
not null |
date |
datetime |
not null |
city |
text |
|
state |
text |
|
address |
text |
|
userId |
int |
not null, foreign key |
groupId |
int |
not null, foreign key |
createdAt |
timestamp |
not null |
updatedAt |
timestamp |
not null |
*userId
references users
table
*groupId
references group
table
Attendees
Column Name |
Data Type |
Details |
userId |
int |
not null, foreign key |
groupId |
int |
not null, foreign key |
createdAt |
timestamp |
not null |
updatedAt |
timestamp |
not null |
*userId
references users
table
*eventId
references group
table