feat: implement TTR preview functionality with caching and UI integration
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 58s

This commit is contained in:
Torsten Schulz (local)
2026-10-05 15:48:33 +02:00
parent 6d982add75
commit 546e3001d4
5 changed files with 287 additions and 2 deletions

View File

@@ -1,6 +1,23 @@
import sequelize from '../database.js';
const migrations = [
{
id: '20261005_create_match_ttr_preview_cache',
async up() {
await sequelize.query(`
CREATE TABLE IF NOT EXISTS match_ttr_preview_cache (
id INT AUTO_INCREMENT PRIMARY KEY,
match_id INT NOT NULL,
snapshot_date DATE NOT NULL,
payload 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_match_ttr_preview_day (match_id, snapshot_date),
CONSTRAINT fk_match_ttr_preview_match FOREIGN KEY (match_id) REFERENCES \`match\`(id) ON DELETE CASCADE
)
`);
},
},
{
id: '20261005_add_hidden_test_user_flags',
async up() {