CREATETABLE `errorlog` (`id`int(11) NOT NULL AUTO_INCREMENT,`timestamp`datetimeNOT NULLDEFAULT CURRENT_TIMESTAMP,`status`varchar(4) NOT NULL,`subcode`varchar(4) NOT NULL,`title`varchar(45) NOT NULL,`message`varchar(1000) DEFAULTNULL,`url`varchar(255),PRIMARY KEY (`id`)) ENGINE=InnoDB AUTO_INCREMENT=2DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
events
Columns
Indexes
Foreign Keys
Script
CREATETABLE `events` (`id`int(11) NOT NULL AUTO_INCREMENT,`user`int(11) NOT NULL,`league`varchar(45) NOT NULL,`date`dateNOT NULL,PRIMARY KEY (`id`),KEY`fk_league_idx` (`league`),KEY`fk_user_idx` (`user`),CONSTRAINT`fk_leagues`FOREIGN KEY (`league`) REFERENCES`leagues` (`name`),CONSTRAINT`fk_user`FOREIGN KEY (`user`) REFERENCES`users` (`id`)) ENGINE=InnoDB AUTO_INCREMENT=5DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
games
Columns
Indexes
Foreign Keys
None
Script
CREATETABLE `games` (`id`int(11) NOT NULL AUTO_INCREMENT,`user`int(11) NOT NULL,`event`int(11) NOT NULL,`hometeam`varchar(100) NOT NULL,`awayteam`varchar(100) NOT NULL,`starttime`varchar(12) NOT NULL,`homescore`int(11) DEFAULTNULL,`awayscore`int(11) DEFAULTNULL,`whistle_start_time`varchar(32) DEFAULTNULL,`whistle_end_time`varchar(32) DEFAULTNULL,PRIMARY KEY (`id`,`user`),KEY`user_idx` (`user`),KEY`event_idx` (`event`),CONSTRAINT`fk_event`FOREIGN KEY (`event`) REFERENCES`events` (`id`)) ENGINE=InnoDB AUTO_INCREMENT=20DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
httplog
Columns
Indexes
Foreign Keys
None
Script
CREATETABLE `httplog` (`id`int(11) NOT NULL AUTO_INCREMENT,`timestamp`datetimeNOT NULLDEFAULT CURRENT_TIMESTAMP,`type`varchar(12) NOT NULL,`url`varchar(255) NOT NULL,`uniqueid`varchar(255) NOT NULL,`approveid`varchar(255) NOT NULL,`message`varchar(1000) NOT NULL,PRIMARY KEY (`id`)) ENGINE=InnoDB AUTO_INCREMENT=35DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
incidents
Columns
Indexes
Foreign Keys
None
Script
CREATETABLE `incidents` (`id`int(11) NOT NULL AUTO_INCREMENT,`timestamp`varchar(60) NOT NULL,`uniquename`varchar(255) NOT NULL,`call`varchar(20) NOT NULL,`message`jsonNOT NULL,PRIMARY KEY (`id`)) ENGINE=InnoDB AUTO_INCREMENT=35DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
leagues
Columns
Indexes
Foreign Keys
Script
CREATETABLE `leagues` (`id`int(11) NOT NULL AUTO_INCREMENT,`name`varchar(45) NOT NULL,`sport`int(11) NOT NULL,`icon`varchar(64) NOT NULL,PRIMARY KEY (`id`,`name`),KEY`idx_name` (`name`),KEY`fk_sport_idx` (`sport`),CONSTRAINT`fk_sport`FOREIGN KEY (`sport`) REFERENCES`sports` (`id`)) ENGINE=InnoDB AUTO_INCREMENT=21DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
progress
Columns
Indexes
Foreign Keys
Script
CREATETABLE `progress` (`id`int(11) NOT NULL AUTO_INCREMENT,`game`int(11) NOT NULL,`status`int(11) NOT NULL,PRIMARY KEY (`id`),KEY`idx_progress_game` (`game`),KEY`fk_status_idx` (`status`),CONSTRAINT`fk_game`FOREIGN KEY (`game`) REFERENCES`games` (`id`),CONSTRAINT`fk_status`FOREIGN KEY (`status`) REFERENCES`status` (`id`)) ENGINE=InnoDB AUTO_INCREMENT=10DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
sports
Columns
Indexes
Foreign Keys
None
Script
CREATETABLE `sports` (`id`int(11) NOT NULL AUTO_INCREMENT,`name`varchar(45) NOT NULL,`icon`varchar(45) NOT NULL,`duration`int(11) DEFAULTNULL,PRIMARY KEY (`id`,`name`),KEY`fk_leagues_idx` (`name`)) ENGINE=InnoDB AUTO_INCREMENT=20DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
status
Columns
Indexes
Foreign Keys
None
Script
CREATETABLE `status` (`id`int(11) NOT NULL,`name`varchar(20) NOT NULL,PRIMARY KEY (`id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
teams
Columns
Indexes
Foreign Keys
Script
CREATETABLE `teams` (`id`int(11) NOT NULL AUTO_INCREMENT,`name`varchar(100) NOT NULL,`icon`varchar(45) NOT NULL,`league`int(11) NOT NULL,PRIMARY KEY (`id`),KEY`fk_teams_leagues_idx` (`league`),CONSTRAINT`fk_teams_leagues`FOREIGN KEY (`league`) REFERENCES`leagues` (`id`)) ENGINE=InnoDB AUTO_INCREMENT=721DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
users
Columns
Indexes
Foreign Keys
None
Script
CREATETABLE `users` (`id`int(11) NOT NULL AUTO_INCREMENT,`timestamp`datetimeNOT NULLDEFAULT CURRENT_TIMESTAMP,`username`varchar(45) NOT NULL,`salt`varchar(128) NOT NULL,`password`char(255) NOT NULL,`email`varchar(60) NOT NULL,PRIMARY KEY (`id`)) ENGINE=InnoDB AUTO_INCREMENT=38DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_c