Table Definition
CREATE TABLE `leagues` (
`id` bigint NOT NULL AUTO_INCREMENT,
`organization_id` bigint NOT NULL,
`administrator_id` bigint NOT NULL,
`name` varchar(255) NOT NULL,
`start_at` datetime NOT NULL,
`end_at` datetime NOT NULL,
`is_deleted` tinyint(1) NOT NULL DEFAULT '0',
`max_round` varchar(255) DEFAULT NULL,
`in_progress_round` varchar(255) DEFAULT NULL,
`sport_type` varchar(20) NOT NULL DEFAULT 'SOCCER',
`third_place_match_enabled` tinyint(1) NOT NULL DEFAULT '0',
`bracket_enabled` tinyint(1) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `FK_LEAGUES_ON_ORGANIZATIONS` (`organization_id`),
KEY `FK_LEAGUES_ON_MEMBERS` (`administrator_id`),
CONSTRAINT `FK_LEAGUES_ON_MEMBERS` FOREIGN KEY (`administrator_id`) REFERENCES `members` (`id`),
CONSTRAINT `FK_LEAGUES_ON_ORGANIZATIONS` FOREIGN KEY (`organization_id`) REFERENCES `organizations` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci| Name | Type | Default | Nullable | Extra Definition | Children | Parents | Comment |
|---|---|---|---|---|---|---|---|
| id | bigint | false | auto_increment | bracket_matches games league_statistics league_teams league_top_scorers | |||
| organization_id | bigint | false | organizations | ||||
| administrator_id | bigint | false | members | ||||
| name | varchar(255) | false | |||||
| start_at | datetime | false | |||||
| end_at | datetime | false | |||||
| is_deleted | tinyint(1) | 0 | false | ||||
| max_round | varchar(255) | true | |||||
| in_progress_round | varchar(255) | true | |||||
| sport_type | varchar(20) | SOCCER | false | ||||
| third_place_match_enabled | tinyint(1) | 0 | false | ||||
| bracket_enabled | tinyint(1) | true |
| Name | Type | Definition |
|---|---|---|
| FK_LEAGUES_ON_MEMBERS | FOREIGN KEY | FOREIGN KEY (administrator_id) REFERENCES members (id) |
| FK_LEAGUES_ON_ORGANIZATIONS | FOREIGN KEY | FOREIGN KEY (organization_id) REFERENCES organizations (id) |
| PRIMARY | PRIMARY KEY | PRIMARY KEY (id) |
| Name | Definition |
|---|---|
| FK_LEAGUES_ON_MEMBERS | KEY FK_LEAGUES_ON_MEMBERS (administrator_id) USING BTREE |
| FK_LEAGUES_ON_ORGANIZATIONS | KEY FK_LEAGUES_ON_ORGANIZATIONS (organization_id) USING BTREE |
| PRIMARY | PRIMARY KEY (id) USING BTREE |
Generated by tbls