Files
goauto/server/app
QiuSWandClaude Opus 5 4f7f3a612a fix(#48): give SYBSession an explicit singular table name
Every other GoAuto model declares TableName(); SYBSession did not, so
gorm silently created syb_sessions while the rest of the schema is
singular. Migration succeeds either way, which is what makes it easy to
miss — it only surfaces when someone queries the conventional name.

Caught by running a real import, before the MySQL migration had been run
anywhere.

Migrate now takes its model list from MigratedModels(), so the new
convention test asserts over exactly the set that Migrate creates instead
of a hand-copied list that would drift. Mutation-checked: dropping the
TableName method again makes the test fail.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-20 09:00:58 +08:00
..