-
Notifications
You must be signed in to change notification settings - Fork 2
Database Schema
Andrew Murray edited this page Mar 22, 2022
·
17 revisions

| column name | data type | details |
|---|---|---|
| id | integer | not null, primary key |
| username | string(50) | not null, unique |
| string(100) | not null, unique | |
| hashed_password | string | not null |
| profile_pic_url | string(500) |
| column name | data type | details |
|---|---|---|
| id | integer | not null, primary key |
| type | string(50) | not null |
| name | string(100) | not null |
| class | string(50) | not null |
| level | integer | not null |
| background | string(50) | not null |
| race | string(50) | not null |
| alignment | string(50) | not null |
| experience | integer | not null |
| strength | integer | not null |
| dexterity | integer | not null |
| constitution | integer | not null |
| intelligence | integer | not null |
| wisdom | integer | not null |
| charisma | integer | not null |
| armor_class | integer | not null |
| speed | integer | not null |
| max_hp | integer | not null |
| current_hp | integer | not null |
| temporary_hp | integer | not null |
| hit_dice_total | integer | not null |
| hit_dice | integer | not null |
| weapons | text | |
| equipment | text | |
| gold_pieces | integer | not null |
| silver_pieces | integer | not null |
| copper_pieces | integer | not null |
| features | text | |
| biography | text | |
| campaign_id | int | foreign key |
| user_id | int | not null, foreign key |
-
campaign_idreferencesCampaignstable -
user_idreferencesUserstable
| column name | data type | details |
|---|---|---|
| id | integer | not null, primary key |
| title | string(50) | not null |
| description | text | |
| owner | integer | not null, foreign key |
| game_master_id | integer | foreign key |
-
ownerreferencesUserstable -
game_master_idreferencesUserstable
| column name | data type | details |
|---|---|---|
| id | integer | not null, primary key |
| user_id | integer | not null, foreign key |
| campaign_id | integer | not null, foreign key |
-
user_idreferencesUserstable -
campaign_idreferencesCampaignstable
| column name | data type | details |
|---|---|---|
| id | integer | not null, primary key |
| title | string(50) | not null |
| campaign_id | integer | not null, foreign key |
-
campaign_idreferencesCampaignstable
| column name | data type | details |
|---|---|---|
| id | integer | not null, primary key |
| title | string(50) | not null |
| content | text | |
| photo_url | string(500) | |
| section_id | integer | not null, foreign key |
-
section_idreferencesSectionstable