Data Schema - ahans1607/Mountain-Project-Clone GitHub Wiki
Users
column name |
data type |
details |
id |
integer |
not null, primary key |
username |
string |
not null, unique |
firstName |
VARCHAR |
not null, |
lastName |
VARCHAR |
not null, |
email |
string |
not null, unique |
created_at |
datetime |
not null |
updated-at |
datetime |
not null |
hashedPassword |
string.binary |
not null |
Spots
column name |
data type |
details |
id |
integer |
not null, primary key |
name |
string |
not null, UNIQUE |
userId |
integer |
foreign key |
picture |
string |
not null |
description |
string |
not null |
location |
string |
not null, |
type |
string |
not null, |
grade |
string |
not null, |
created_at |
datetime |
not null |
updated-at |
datetime |
not null |
Reviews
column name |
data type |
details |
id |
integer |
not null, primary key |
content |
string |
not null |
userId |
integer |
not null, foreign key |
spotId |
integer |
not null, foreign key |
created_at |
datetime |
not null |
updated-at |
datetime |
not null |
userId
references users
table
spotId
references spots
table
mySpots
column name |
data type |
details |
id |
integer |
not null, primary key |
name |
string |
not null |
userId |
integer |
not null, foreign key |
created_at |
datetime |
not null |
updated-at |
datetime |
not null |
userId
references users
table
mySpotsJoinTable
column name |
data type |
details |
id |
integer |
not null, primary key |
spotId |
integer |
not null, foreign key |
mySpotsId |
integer |
not null, foreign key |
created_at |
datetime |
not null |
updated-at |
datetime |
not null |
mySpotsId
references mySpots
table
spotId
references spots
table