8 Commits

Author SHA1 Message Date
Ryan Chen
3d6b75c02e Fix migration: remove drops of columns that only existed locally
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-03 14:43:38 -04:00
Ryan Chen
46d45eebb6 Add right/wrong marking with steal mechanism and question stats
Adds Correct/Wrong buttons to admin panel that track question
answer stats across games and implement a steal system where
the next team gets one chance to answer if the first team is wrong.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-03 14:40:58 -04:00
Ryan Chen
7402f18bcf Add render_as_batch for SQLite and document migration rules
- Set render_as_batch=True in Alembic env.py so autogenerated
  migrations use batch mode for SQLite compatibility
- Add SQLite + Alembic section to CLAUDE.md with rules for
  avoiding circular dependency and idempotency issues

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-03 10:41:36 -04:00
Ryan Chen
f1a05a68a8 Make migrations idempotent for production DB with pre-existing columns
Check for existing columns/tables before adding to avoid duplicate
column errors when production DB state is ahead of Alembic history.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-03 10:36:21 -04:00
Ryan Chen
bac02fecf5 Fix SQLite circular dependency in batch migrations
Split batch_alter_table operations to avoid circular dependency
errors caused by the current_turn_team_id foreign key during
SQLite table recreation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-03 10:33:24 -04:00
Ryan Chen
69992f1be9 Add question ownership and sharing
Questions now have a created_by field linking to the user who created them.
Users only see questions they own or that have been shared with them.
Includes share dialog, user search, bulk sharing, and export/import
respects ownership.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-03 09:43:04 -04:00
ryan
e431ba45e9 oops 2026-01-18 16:22:43 -05:00
Ryan Chen
00e9eb8986 initial 2025-12-22 14:47:25 -05:00