Database Schema - le-as-a/ok-dnd Wiki

schema

User

Column Name Data Type Details
id integer primary key, not null
username string(25) not null, unique
email string not null, unique
icon_url string
hash_pw varbinary not null
question_id integer foreign key
schedule_id integer foreign key

Questionnaire

Column Name Data Type Details
id integer primary key, not null
exp_lvl integer not null
diff_lvl integer not null
themes string not null
starting_lvl integer not null
gameplay string not null
background text

Campaign

Column Name Data Type Details
id integer primary key, not null
name string not null
about text not null
splash_url string
question_id integer foreign key
schedule_id integer foreign key

Schedule -- WIP, figuring out how to store availability and scheduling.

Potential Bonus Feature Databases

Chat

Column Name Data Type Details
id integer primary key, not null
user_1 integer foreign key, not null
user_2 integer foreign key, not null

Messages

Column Name Data Type Details
id integer primary key, not null
chat_id integer foreign key, not null
user_id integer foreign key, not null
content text not null