Skip to content

Rites model declares page and short_desc columns that don't exist in the DB schema #287

Description

@Daelso

Steps to reproduce

  1. Bring up local stack against the standard login MySQL DB.
  2. curl -H 'Accept: application/json' http://localhost:5000/garou/rites (or load any Werewolf editor).
  3. API returns 500.

What happens

API server logs:

SequelizeDatabaseError: Unknown column 'page' in 'field list'
sql: 'SELECT `rite_id`, `rite_name`, `rite_description`, `pool`, `social`, `page`, `short_desc` FROM `rites` AS `rites`;'

Root cause

server/models/werewolf/Rites.js declares two columns that aren't in the DB schema:

  • page (INTEGER, NOT NULL)
  • short_desc (STRING, NOT NULL)

DESC rites on a current dev DB shows only rite_id, rite_name, rite_description, pool, social. Sequelize generates a SELECT that includes the model fields, the DB rejects it.

Suggested fix

Per CLAUDE.md ("Never add, remove, rename, or retype a column on a Sequelize model without a paired migration in the same PR"), the fix needs both:

  1. A new migration that adds page and short_desc to rites using the add-nullable → backfill → tighten-to-NOT-NULL pattern (or just adds them as nullable for now if rule data isn't ready).
  2. A backfill plan for the existing rite rows — without it, the new NOT NULL constraint can't apply to existing data.

Alternative: drop page and short_desc from the model if they were added speculatively and the data isn't tracked elsewhere.

Discovered by

Surfaced in CI logs of PR #286 (the e2e scaffolding PR), where the Werewolf editor load triggers GET /garou/rites. Documented as Defect 5 / "garou gift endpoint 404s" investigation in docs/qa/reports/2026-05-15-xp-log.md §7.3.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions