新增 競賽建立、評審建立、團隊建立
This commit is contained in:
@@ -138,10 +138,12 @@ CREATE TABLE `competition_award_types` (
|
||||
`description` TEXT,
|
||||
`icon` VARCHAR(50) NOT NULL,
|
||||
`color` VARCHAR(20) NOT NULL,
|
||||
`order_index` INT DEFAULT 0,
|
||||
`is_active` BOOLEAN DEFAULT TRUE,
|
||||
`created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
FOREIGN KEY (`competition_id`) REFERENCES `competitions`(`id`) ON DELETE CASCADE,
|
||||
INDEX `idx_competition` (`competition_id`),
|
||||
INDEX `idx_order` (`order_index`),
|
||||
INDEX `idx_is_active` (`is_active`)
|
||||
);
|
||||
|
||||
@@ -213,6 +215,7 @@ CREATE TABLE `competition_teams` (
|
||||
`competition_id` VARCHAR(36) NOT NULL,
|
||||
`team_id` VARCHAR(36) NOT NULL,
|
||||
`submitted_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
`registered_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
FOREIGN KEY (`competition_id`) REFERENCES `competitions`(`id`) ON DELETE CASCADE,
|
||||
FOREIGN KEY (`team_id`) REFERENCES `teams`(`id`) ON DELETE CASCADE,
|
||||
UNIQUE KEY `unique_competition_team` (`competition_id`, `team_id`),
|
||||
|
Reference in New Issue
Block a user