feat(kaisertisch): implement Kaisertisch tournament functionality with model, routes, and controller
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 57s

This commit is contained in:
Torsten Schulz (local)
2026-08-19 14:02:12 +02:00
parent d251d40868
commit 18ba120927
7 changed files with 191 additions and 27 deletions

View File

@@ -0,0 +1,11 @@
CREATE TABLE IF NOT EXISTS kaisertisch_tournaments (
id INT AUTO_INCREMENT PRIMARY KEY,
club_id INT NOT NULL,
diary_date_id INT NOT NULL,
state JSON NOT NULL,
created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
UNIQUE KEY uniq_kaisertisch_tournament_club_date (club_id, diary_date_id),
CONSTRAINT fk_kaisertisch_tournament_club FOREIGN KEY (club_id) REFERENCES clubs(id) ON DELETE CASCADE,
CONSTRAINT fk_kaisertisch_tournament_date FOREIGN KEY (diary_date_id) REFERENCES diary_dates(id) ON DELETE CASCADE
);