This commit is contained in:
torsten 2026-10-18 23:16:07 +02:00
parent 50cd802d33
commit 317f0bce1a
224 changed files with 1105 additions and 27 deletions

View file

@ -39,7 +39,9 @@ CREATE TABLE `games` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`round_id` int(11) NOT NULL,
`team1` varchar(100) NOT NULL,
`team1_id` int(11) DEFAULT NULL,
`team2` varchar(100) NOT NULL,
`team2_id` int(11) DEFAULT NULL,
`score1` int(11) NOT NULL DEFAULT '-1',
`score2` int(11) NOT NULL DEFAULT '-1',
`kickoff` datetime NOT NULL,
@ -48,6 +50,30 @@ CREATE TABLE `games` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
DROP TABLE IF EXISTS `teams`;
CREATE TABLE `teams` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`key` varchar(64) NOT NULL,
`type` enum('club','national') NOT NULL DEFAULT 'club',
`name` varchar(100) NOT NULL,
`country` varchar(8) DEFAULT NULL,
`logo` varchar(255) DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `teams_key_unique` (`key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
DROP TABLE IF EXISTS `team_aliases`;
CREATE TABLE `team_aliases` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`team_id` int(11) NOT NULL,
`alias` varchar(128) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `team_aliases_alias_unique` (`alias`),
KEY `team_aliases_team_id_index` (`team_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
DROP TABLE IF EXISTS `rounds`;
CREATE TABLE `rounds` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,