feat: ticker symbol voting for live votes

- Add ticker column to games table with migration
- Bootstrap tickers from tickers.json config on startup
- POST /api/votes/live accepts optional ticker field for direct game
  lookup (bypasses timestamp-interval matching)
- Ticker votes work for any game, not just session games
- Update API docs and add e2e tests for ticker voting
- Version bump to 0.6.5

Made-with: Cursor
This commit is contained in:
cottongin
2026-04-05 04:27:58 -04:00
parent b2bb2989e9
commit ea6e8db90b
9 changed files with 322 additions and 61 deletions

View File

@@ -125,6 +125,19 @@ function initializeDatabase() {
// Column already exists, ignore error
}
// Add ticker column for ticker-symbol voting
try {
db.exec(`ALTER TABLE games ADD COLUMN ticker TEXT`);
} catch (err) {
// Column already exists, ignore error
}
try {
db.exec(`CREATE UNIQUE INDEX IF NOT EXISTS idx_games_ticker ON games(ticker)`);
} catch (err) {
// Index already exists, ignore error
}
// Migrate existing popularity_score to upvotes/downvotes if needed
try {
const gamesWithScore = db.prepare(`