Database Schema - casey-cochran/Intermediate-group-proj GitHub Wiki

Users

column name data type details
id int not null, primary key
firstName string not null
lastName string not null
email string not null, unique
hashedPass string not null
created_at datetime not null
updated_at datetime not null

HobbyPosts

column name data type details
id int not null, primary key
title string not null
content text not null
userId int not null, foreign key
created_at datetime not null
updated_at datetime not null
  • userId references users table

Comments

column name data type details
id int not null, primary key
content text not null
hobbyPostId int not null, foreign key
userId int not null, foreign key
created_at datetime not null
updated_at datetime not null
  • userId references users table
  • hobbyPostId references hobbyPosts table

Shakas (likes)

column name data type details
id int not null, primary key
userId int not null, foreign key
hobbyPostId int not null, foreign key
created_at datetime not null
updated_at datetime not null
  • userId references users table
  • hobbyPostId references hobbyPosts table

Followers

column name data type details
id int not null, primary key
followerId int not null, foreign key
followedId int not null, foreign key
created_at datetime not null
updated_at datetime not null
  • followerId references users table
  • followedId references users table