Database Schema - PotatoAim11518/linkshell-app GitHub Wiki
Database Schema
users
column name |
data type |
details |
id |
integer |
not null, primary key |
username |
string |
not null, unique |
email |
string |
not null, unique |
hashedPassword |
string |
not null, unique |
createdAt |
datetime |
not null |
updatedAt |
datetime |
not null |
locations
column name |
data type |
details |
id |
integer |
not null, primary key |
name |
string |
not null |
locale |
string |
|
createdAt |
timestamp |
not null |
updatedAt |
timestamp |
not null |
types
column name |
data type |
details |
id |
integer |
not null, primary key |
name |
string |
not null |
createdAt |
datetime |
not null |
updatedAt |
datetime |
not null |
groups
column name |
data type |
details |
id |
integer |
not null, primary key |
name |
string |
not null |
about |
text |
not null |
typeId |
integer |
not null, foreign key |
ownerId |
integer |
not null, foreign key |
createdAt |
datetime |
not null |
updatedAt |
datetime |
not null |
typeId
references types
table
ownerId
references users
table
userGroups
column name |
data type |
details |
id |
integer |
not null, primary key |
userId |
integer |
not null, foreign key |
groupId |
integer |
not null, foreign key |
createdAt |
datetime |
not null |
updatedAt |
datetime |
not null |
userId
references users
table
groupId
references groups
table
events
column name |
data type |
details |
id |
integer |
not null, primary key |
name |
string |
not null |
date |
datetime |
not null |
capacity |
integer |
not null |
hostId |
integer |
not null, foreign key |
locationId |
integer |
not null, foreign key |
groupId |
integer |
not null, foreign key |
createdAt |
timestamp |
not null |
updatedAt |
timestamp |
not null |
hostId
references users
table
locationId
references locations
table
groupId
references groups
table
rsvps
column name |
data type |
details |
id |
integer |
not null, primary key |
userId |
integer |
not null, foreign key |
eventId |
integer |
not null, foreign key |
createdAt |
datetime |
not null |
updatedAt |
datetime |
not null |
userId
references users
table
eventId
references events
table