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>
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>
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>