Schema - acabrera100/personal_project GitHub Wiki

Table: Users

Column Name Data Type Details
id Integer Not null, primary key
username String Not null, indexed, unique
password String Not null

Table: Posts

Column Name Data Type Details
id Integer not null, primary key
user_id Integer Id of the user who made the post
text_title Text Title of the post
text_body Text Main body of the post
url VarChar Accepts url, logic can be used to determine whether it's an image, video, or gif?
post_type VarChar "text' "image" "audio"

When you make a post the post_type will determine what kind of post it will be and then present the front end options from there.

Table: Tags

Column Name Data Type Details
id Integer Not null,primary key
name String TagName,VarChar

Table: Posts_tags

Column Name DataType Details
post_id Integer Id of the post being tagged
tag_id Integer Id of the tag being assigned to a post

Table: Following

Column Name DataType Details
id Serial Primary Key
follower_id Integer referencing Users(id) ON DELETE CASCADE
folllowing_id Integer referencing Users(id) ON DELETE CASCADE
);