Add naming scheme selection to run configuration

Add a nullable naming_scheme column to NuzlockeRun so users can pick a
themed word category for nickname suggestions. Includes Alembic migration,
updated Pydantic schemas, a GET /runs/naming-categories endpoint backed by
a cached dictionary loader, and frontend dropdowns in both the NewRun
creation flow and the RunDashboard for mid-run changes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-11 21:36:50 +01:00
parent e61fce5f72
commit e324559476
15 changed files with 215 additions and 31 deletions

View File

@@ -0,0 +1,29 @@
"""add naming_scheme to nuzlocke_runs
Revision ID: e5f6a7b8c9d1
Revises: d4e5f6a7b9c0
Create Date: 2026-02-11 12:00:00.000000
"""
from collections.abc import Sequence
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision: str = "e5f6a7b8c9d1"
down_revision: str | Sequence[str] | None = "d4e5f6a7b9c0"
branch_labels: str | Sequence[str] | None = None
depends_on: str | Sequence[str] | None = None
def upgrade() -> None:
op.add_column(
"nuzlocke_runs",
sa.Column("naming_scheme", sa.String(50), nullable=True),
)
def downgrade() -> None:
op.drop_column("nuzlocke_runs", "naming_scheme")