Skip to content

Database Schema

Joshua Raphael Bautista edited this page Apr 29, 2022 · 4 revisions

Users

Column Name Data Type Details
id integer not null, primary key
email string(3,256) not null, unique
username string(3,30) not null, unique
hashedPassword string not null
createdAt timestamp not null
updatedAt timestamp not null

Landmarks

Column Name Data Type Details
id integer not null, primary key
userId integer not null
name string not null
imageUrl string not null
description text nullable
lat decimal nullable
lng decimal nullable
createdAt timestamp not null
updatedAt timestamp not null
  • userId references Users table

Reviews

Column Name Data Type Details
id integer not null, primary key
userId integer not null
landMarkId integer not null
review text not null
createdAt timestamp not null
updatedAt timestamp not null
  • userId references Users table
  • landMarkId references Landmarks table

Profiles

Column Name Data Type Details
id integer not null, primary key
userId integer not null
fullName string
profilePic string defaultValue = 'anon-image'
description text
createdAt timestamp not null
updatedAt timestamp not null
  • userId references Users table
Clone this wiki locally