Skip to content

Database Schema

Tran Le edited this page Apr 25, 2021 · 10 revisions

Puppr-Schema

Users

column name data type details
id integer not null, primary key
firstName string not null
lastName string not null
username string not null, unique
email string not null, unique
hashedPassword string not null
createdAt timestamp not null
updatedAt timestamp not null

Photos

column name data type details
id integer not null, primary key
title string not null
caption string
imgURL string not null
userId integer not null
createdAt timestamp not null
updatedAt timestamp not null
  • userId references Users table

Albums

column name data type details
id integer not null, primary key
name string not null
description string
userId integer not null
createdAt timestamp not null
updatedAt timestamp not null
  • userId references Users table

AlbumPhotos

column name data type details
id integer not null, primary key
photoId integer not null
albumId integer not null
createdAt timestamp not null
updatedAt timestamp not null
  • photoId references Photos table
  • albumId references Albums table

Comments

column name data type details
id integer not null, primary key
body string not null
userId integer not null
photoId integer not null
createdAt timestamp not null
updatedAt timestamp not null
  • userId references Users table
  • photoId references Photos table

Clone this wiki locally