Skip to content
Valery Nguyen edited this page May 13, 2019 · 2 revisions

Database Schema

spots

column name data type details
id integer not null, primary key
host_id integer not null
name string not null
images array of integers not null
description text not null
lng float not null
lat float not null
street_address string not null
city string not null
state string not null
zip integer not null
price float not null
occupancy integer not null
created_at datetime not null

images

column name data type details
id integer not null, primary key
spot integer not null
img_url string not null
created_at datetime not null

users

column name data type details
id integer not null, primary key
handle string not null, indexed, unique
email string not null, indexed, unique
password string not null
date datetime not null

bookings

column name data type details
id integer not null, primary key
user_id integer not null, indexed
spot_id integer not null, indexed
guest_count integer not null
start_date date not null
end_date date not null
created_at datetime not null