Skip to content

LaunchPad DB Schema

Bryan Thompson edited this page Feb 15, 2024 · 8 revisions

Database Schema

image

users

column name data type details
id integer not null, primary key
username string not null, unique
first_name string not null,
last_name string not null,
email string not null, unique
created_at datetime not null
updated-at datetime not null

categories

column name data type details
id integer not null, primary key
name string not null, unique
description string not null
created_at datetime not null
updated-at datetime not null

projects

column name data type details
id integer not null, primary key
title string not null
owner_id integer not null, foreign key
subtitle string not null
category_id integer foreign key
location string not null
story text not null
risks text not null
cover_image string not null
funding_goal decimal not null
end_date date
created_at datetime not null
updated-at datetime not null
  • owner_id references users table
  • category_id references categories table

rewards

column name data type details
id integer not null, primary key
name string not null
description string not null
img_url string not null
amount decimal not null
est_del_date date not null
project_id integer not null, foreign key
quantity integer not null
created_at datetime not null
updated-at datetime not null
  • project_id references projects table

backed_projects

column name data type details
user_id integer not null, primary key, foreign
project_id integer not null, primary key, foreign
reward_id integer not null, foreign key
created_at datetime not null
updated-at datetime not null
  • user_id references users table
  • project_id references projects table
  • reward_id references rewards table

likes

column name data type details
user_id integer not null, primary key, foreign
project_id integer not null, primary key, foreign
created_at datetime not null
updated-at datetime not null
  • user_id references users table
  • project_id references projects table

Clone this wiki locally