Tables
The following is a list of the tables in the Couch Potato database:
Legend:
PK- Primary Key
NN - Not Null
AI - Auto Increment
errorlog
Columns
Column | Datatype | PK | NN | AI | Default |
id | INT(11) | ✅ | ✅ | ✅ |
|
timestamp | DATETIME | ❌ | ✅ | ❌ | CURRENT_TIMESTAMP |
status | VARCHAR(4) | ❌ | ✅ | ❌ |
|
subcode | VARCHAR(4) | ❌ | ✅ | ❌ |
|
title | VARCHAR(255) | ❌ | ✅ | ❌ |
|
message | VARCHAR(1000) | ❌ | ❌ | ❌ | NULL |
url | VARCHAR(255) | ❌ | ✅ | ❌ |
Indexes
Index | Type | Columns | Order |
PRIMARY | PRIMARY | id | ASC |
Foreign Keys
None.
Script
events
Columns
Column | Datatype | PK | NN | AI | Default |
id | INT(11) | ✅ | ✅ | ✅ |
|
user | INT(11) | ❌ | ✅ | ❌ |
|
league | VARCHAR(45) | ❌ | ✅ | ❌ |
|
date | DATE | ❌ | ✅ | ❌ |
|
Indexes
Index | Type | Columns | Order |
PRIMARY | PRIMARY | id | ASC |
fk_user_idx | INDEX | user | ASC |
fk_league_idx | INDEX | league | ASC |
Foreign Keys
Foreign Key | Referenced Table | Column | Referenced Column |
fk_user | 'couch_potato'.'users' | user | id |
fk_leagues | 'couch_potato'.'leagues' | league | name |
Script
games
Columns
Column | Datatype | PK | NN | AI | Default |
id | INT(11) | ✅ | ✅ | ✅ |
|
user | INT(11) | ❌ | ✅ | ❌ |
|
event | INT(11) | ❌ | ✅ | ❌ |
|
hometeam | VARCHAR(100) | ❌ | ✅ | ❌ |
|
awayteam | VARCHAR(100) | ❌ | ✅ | ❌ |
|
starttime | VARCHAR(12) | ❌ | ✅ | ❌ |
|
homescore | INT(11) | ❌ | ❌ | ❌ | NULL |
awayscore | INT(11) | ❌ | ❌ | ❌ | NULL |
whistle_start_time | VARCHAR(32) | ❌ | ❌ | ❌ | NULL |
whistle_end_time | VARCHAR(32) | ❌ | ❌ | ❌ | NULL |
Indexes
Index | Type | Columns | Order |
PRIMARY | PRIMARY | id, user | ASC |
user_idx | INDEX | user | ASC |
Foreign Keys
None
Script
httplog
Columns
Column | Datatype | PK | NN | AI | Default |
id | INT(11) | ✅ | ✅ | ✅ |
|
timestamp | DATETIME | ❌ | ✅ | ❌ | CURRENT_TIMESTAMP |
type | VARCHAR(12) | ❌ | ✅ | ❌ |
|
url | VARCHAR(255) | ❌ | ✅ | ❌ |
|
uniqueid | VARCHAR(255) | ❌ | ✅ | ❌ |
|
approveid | VARCHAR(255) | ❌ | ✅ | ❌ |
|
message | VARCHAR(1000) | ❌ | ✅ | ❌ |
|
Indexes
Index | Type | Columns | Order |
PRIMARY | PRIMARY | id | ASC |
Foreign Keys
None
Script
incidents
Columns
Column | Datatype | PK | NN | AI | Default |
id | INT(11) | ✅ | ✅ | ✅ |
|
timestamp | VARCHAR(60) | ❌ | ✅ | ❌ |
|
uniquename | VARCHAR(255) | ❌ | ✅ | ❌ |
|
call | VARCHAR(20) | ❌ | ✅ | ❌ |
|
message | JSON | ❌ | ✅ | ❌ |
|
url | VARCHAR(255) | ❌ | ✅ | ❌ |
|
Indexes
Index | Type | Columns | Order |
PRIMARY | PRIMARY | id | ASC |
Foreign Keys
None
Script
leagues
Columns
Column | Datatype | PK | NN | AI | Default |
id | INT(11) | ✅ | ✅ | ✅ |
|
name | VARCHAR(45) | ❌ | ✅ | ❌ |
|
sport | INT(11) | ❌ | ✅ | ❌ |
|
icon | VARCHAR(64) | ❌ | ✅ | ❌ |
|
Indexes
Index | Type | Columns | Order |
PRIMARY | PRIMARY | id, name | ASC |
idx_name | INDEX | name | ASC |
fk_sport_idx | INDEX | sport | ASC |
Foreign Keys
Foreign Key | Referenced Table | Column | Referenced Column |
fk_sport | 'couch_potato'.'sports' | sport | id |
Script
progress
Columns
Column | Datatype | PK | NN | AI | Default |
id | INT(11) | ✅ | ✅ | ✅ |
|
game | INT(11) | ❌ | ✅ | ❌ |
|
status | INT(11) | ❌ | ✅ | ❌ |
|
Indexes
Index | Type | Columns | Order |
PRIMARY | PRIMARY | id | ASC |
fk_status_idx | INDEX | status | ASC |
Foreign Keys
Foreign Key | Referenced Table | Column | Referenced Column |
fk_status | 'couch_potato'.'status' | status | id |
Script
sports
Columns
Column | Datatype | PK | NN | AI | Default |
id | INT(11) | ✅ | ✅ | ✅ |
|
name | VARCHAR(45) | ✅ | ✅ | ❌ |
|
icon | VARCHAR(45) | ❌ | ✅ | ❌ |
|
duration | INT(11) | ❌ | ❌ | ❌ | NULL |
Indexes
Index | Type | Columns | Order |
PRIMARY | PRIMARY | id | ASC |
fk_leagues_idx | INDEX | name | ASC |
Foreign Keys
None
Script
status
Columns
Column | Datatype | PK | NN | AI | Default |
id | INT(11) | ✅ | ✅ | ✅ |
|
name | VARCHAR(20) | ❌ | ✅ | ❌ |
|
Indexes
Index | Type | Columns | Order |
PRIMARY | PRIMARY | id | ASC |
Foreign Keys
None
Script
teams
Columns
Column | Datatype | PK | NN | AI | Default |
id | INT(11) | ✅ | ✅ | ✅ |
|
name | VARCHAR(100) | ✅ | ✅ | ❌ |
|
icon | VARCHAR(45) | ❌ | ✅ | ❌ |
|
league | INT(11) | ❌ | ✅ | ❌ |
|
Indexes
Index | Type | Columns | Order |
PRIMARY | PRIMARY | id | ASC |
fk_teams_leagues_idx | INDEX | league | ASC |
Foreign Keys
Foreign Key | Referenced Table | Column | Referenced Column |
fk_teams_leagues | 'couch_potato'.'leagues' | league | id |
Script
users
Columns
Column | Datatype | PK | NN | AI | Default |
id | INT(11) | ✅ | ✅ | ✅ |
|
timestamp | DATETIME | ❌ | ✅ | ❌ | CURRENT_TIMESTAMP |
username | VARCHAR(45) | ❌ | ✅ | ❌ |
|
salt | VARCHAR(128) | ❌ | ✅ | ❌ |
|
password | CHAR(255) | ❌ | ✅ | ❌ |
|
VARCHAR(60) | ❌ | ✅ | ❌ |
|
Indexes
Index | Type | Columns | Order |
PRIMARY | PRIMARY | id | ASC |
Foreign Keys
None
Script
Last updated