Add game category and region metadata for genlocke presets
Add `category` field (original/remake/enhanced/sequel/spinoff) to the Game model and tag all 38 games. Create regions.json with generation mapping, ordering, and genlocke preset defaults per region. Add GET /games/by-region endpoint returning games grouped by region. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
"""add category to games
|
||||
|
||||
Revision ID: a1b2c3d4e5f8
|
||||
Revises: f6a7b8c9d0e1
|
||||
Create Date: 2026-02-09 12:00:00.000000
|
||||
|
||||
"""
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = 'a1b2c3d4e5f8'
|
||||
down_revision: Union[str, Sequence[str], None] = 'f6a7b8c9d0e1'
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
op.add_column(
|
||||
'games',
|
||||
sa.Column('category', sa.String(20), nullable=True),
|
||||
)
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
op.drop_column('games', 'category')
|
||||
Reference in New Issue
Block a user