Skip to content
Nathan Blaz edited this page May 22, 2021 · 30 revisions

Diagram

Schema

Tables

Users

ColumnName DataType Details
id integer not null, primary key
Name string not null
Email string unique, not null, indexed
Bio text
HashedPassword string.binary not null
Avatar string
createdAt timestamp not null
updatedAt timestamp not null

Checkins

ColumnName DataType Details
id integer not null, primary key
userId integer foreign key
shopId integer foreign key
bagelId integer foreign key
review text not null
rating integer not null
image string not null
createdAt timestamp
updatedAt timestamp

BagelShops

ColumnName DataType Details
id integer not null, primary key
name string not null
address string
city string not null
state string not null
zipcode int
phone string
information text
createdAt timestamp
updatedAt timestamp

Bagels

ColumnName DataType Details
id integer not null, primary key
bagelType string not null
shopId integer foreign key
description string
createdAt timestamp
createdAt timestamp

Clone this wiki locally