-
Notifications
You must be signed in to change notification settings - Fork 0
Database Schema
Dale Sakamoto edited this page Dec 28, 2020
·
2 revisions
column name | data type | details |
---|---|---|
id |
integer | not null, primary key |
username |
string(50) | not null, unique |
email |
string(50) | not null, unique |
hashedPassword |
binary string | not null |
avatar |
string(255) | |
description |
string(255) | |
createdAt |
datetime | not null |
updatedAt |
datetime | not null |
- both
avatar
anddescription
are designed for future expansion of the user profile to set their own picture and brief "about" - unique index on
username
- unique index on
email
- Sequelize
hasMany
Routes
association
column name | data type | details |
---|---|---|
id |
integer | not null, primary key |
name |
string(100) | not null |
startPoint |
integer | not null |
endPoint |
integer | not null |
distance |
integer | |
description |
string(255) | |
userId |
integer | not null, foreign key |
createdAt |
datetime | not null |
updatedAt |
datetime | not null |
-
userId
referencesUsers
table - Sequelize
belongsToMany
Users
association