Database Schema - cc-y-zhao/Slack-ish GitHub Wiki

Users

column name data type details
id integer not null, primary key
first_name varchar not null
last_name varchar not null
email varchar not null, unique
hashedPassword varchar not null
image_Url varchar

Messages

column name data type details
id integer not null, primary key
user_id integer not null, references User (user.id)
channel_id integer not null, references Channel (channel.id)
content text not null

Channels

column name data type details
id integer not null, primary key
owner_id integer references User (user.id)
title string not null
is_dm boolean not null
description text

Channels_Users

column name data type details
id integer not null, primary key
user_id integer not null, references User (user.id)
channel_id integer not null, references Channel (channel.id)

Notifications

column name data type details
id integer not null, primary key
user_id integer not null, references User (user.id)
channel_id integer not null, references Channel (channel.id)
message_id integer not null, references Message (message.id)

Database Diagram

slackishdb