Skip to content

Database Schema

will short edited this page Nov 15, 2021 · 19 revisions

Database Scheme
(Click on image for link to dbdiagram.io)


Users

column name data type details
id integer not null, pk
name varchar not null
username varchar not null
email varchar not null, unique
hashed_password bytea not null
profile_image varchar
location varchar
created_at timestamp not null
updated_at timestamp not null

Checkins

column name data type details
id integer not null, pk
description varchar
image varchar
rating numeric
drink_id integer not null, fk
location varchar
owner_id integer not null, fk
created_at timestamp not null
updated_at timestamp not null
  • owner_id references Users table
  • drink_id references Drinks table
  • location_id references Locations table

Drinks

column name data type details
id integer not null, pk
name varchar not null
description varchar not null
image varchar
ingredients string not null,fk
created_at timestamp not null
updated_at timestamp not null
  • group_id references Group table
  • owner_id references Users table
  • ingredient_id references ingredients table

Comments

column name data type details
id integer not null, pk
content varchar not null
owner_id integer not null, fk
checkin_id integer not null, fk
created_at timestamp not null
updated_at timestamp not null
  • owner_id references Users table
  • checkin_id references Checkins table
Clone this wiki locally