Database Schema - RSpencerFink/Concord GitHub Wiki

Database Schema

Users

Column Name Data Type Details
Id integer not null, unique
username string not null, indexed
email string not null, unique
password_digest string not null
session_token string not null, indexed, unique
image_url string not null
created_at datetime not null
updated_at datetime not null

Servers

Column Name Data Type Details
id integer not null, unique
server_name string not null, indexed
owner_id integer not null, indexed
server_info string ---
image_url string not null
created_at datetime not null
updated_at datetime not null

Channels

Column Name Data Type Details
id integer not null, unique
channel_name string not null, indexed
channel_info string ---
server_id integer not null, indexed
created_at datetime not null
updated_at datetime not null

Messages

Column Name Data Type Details
id integer not null, unique
author_id integer not null, indexed
channel_id integer not null, indexed
message text not null
created_at datetime not null
updated_at datetime not null

Server Members

Column Name Data Type Details
id integer not null, unique
user_id integer not null, indexed
server_id integer not null, indexed
created_at datetime not null
updated_at datetime not null

Friends

Column Name Data Type Details
id integer not null, unique
requester_id integer not null, indexed
requested_id integer not null, indexed
request_status string not null
created_at Datetime not null
updated_at Datetime not null