Skip to content

app/: sessions.user_id is a uuid, so database sessions work (sc-8900) - #104

Merged
ndbroadbent merged 2 commits into
mainfrom
app-sessions-uuid
Dec 3, 2026
Merged

ndbroadbent merged 2 commits into
mainfrom
app-sessions-uuid

Conversation

@ndbroadbent

@ndbroadbent ndbroadbent commented Dec 3, 2026 •

Copy link
Copy Markdown
Member

A cutover blocker that features' parity run found: with SESSION_DRIVER=database, which production uses, every sign-in answered 500, because sessions.user_id was a bigint and a user's auth id is their pid, a UUID (since #57): column "user_id" is of type bigint but expression is of type uuid. GitHub and GitLab sign-ins write the same row.

  • sessions.user_id is a uuid, in the users migration itself: production's database is wiped at the cutover, so there's nothing to migrate.
  • app::testing keeps sessions and the cache in Postgres (SESSION_DRIVER=database, CACHE_STORE=database), as production does, so every sign-in test now writes the real session row. The GitHub sign-in test also checks that row exists under the user's pid.
  • The queue stays sync in tests: production queues on the database and runs jobs on its worker, and tests run them inline.

A development database that already ran the users migration needs a fresh migrate.

@ndbroadbent
ndbroadbent merged commit 12724f3 into main Dec 3, 2026
12 checks passed
@ndbroadbent
ndbroadbent deleted the app-sessions-uuid branch December 3, 2026 02:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant