-
Notifications
You must be signed in to change notification settings - Fork 0
Schema
shaoevans edited this page Jan 19, 2020
·
3 revisions
Backend Tables
column name | data type | details |
---|---|---|
id |
integer | not null, primary key |
username |
string | not null, unique, indexed |
password digest |
string | not null |
session_token |
string | not null, unique, indexed |
balance |
integer | not null, default: 1000 |
date |
datetime | not null |
- index on username, unique: true
- index on session_token, unique: true
column name | data type | details |
---|---|---|
id |
integer | not null, primary key |
user1_id |
integer | not null, foreign key, indexed |
user2_id |
integer | not null, foreign key, indexed |
- index on user1_id
- index on user2_id
- combinations of user1_id and user2_idmust be unique
column name | data type | details |
---|---|---|
id |
integer | not null, primary key |
max_capacity |
integer | not null, default 16 |
lobby_name |
string | not null |
password |
string | optional |
balance_limit |
integer | optional |
date |
datetime | not null |
column name | data type | details |
---|---|---|
id |
integer | not null, primary key |
body |
string | not null |
author_id |
integer | not null, foreign key |
chatroom_id |
integer | not null, foreign key |
date |
datetime | not null |
column name | data type | details |
---|---|---|
id |
integer | not null, primary key |
chatroom_name |
string | not null |
` |
column name | data type | details |
---|---|---|
id |
integer | not null, primary key |
chatroom_id |
integer | not null, foreign key |
user_id |
integer | not null, foreign key |