Database Schema - walkeradkins/slick-app GitHub Wiki

slack_clone_screenshot

users

column name column type constraints
id integer not null, primary key
first_name varchar not null
last_name varchar not null
email varchar not null, unique
hashed_password varchar not null, unique
profile_img varchar not null
created_at timestamp not null
updated_at timestamp not null

channels

column name column type constraints
id integer not null, primary key
owner_id integer not null
name string not null
description text not null
created_at timestamp not null
updated_at timestamp not null
  • owner_id references users table

messages

column name column type constraints
id integer not null, primary key
content varchar(2000) not null
owner_id integer not null
channel_id integer not null
created_at timestamp not null
updated_at timestamp not null
  • owner_id references users table
  • channel_id references channels table

members

column name column type constraints
id integer not null, primary key
user_id integer not null
channel_id integer not null
  • user_id references users table
  • channel_id references channels table