Skip to content

Fix registration 500 error from missing DB columns#41

Merged
onamfc merged 1 commit intomainfrom
dev
Mar 16, 2026
Merged

Fix registration 500 error from missing DB columns#41
onamfc merged 1 commit intomainfrom
dev

Conversation

@onamfc
Copy link
Copy Markdown
Owner

@onamfc onamfc commented Mar 16, 2026

Summary

  • Adds migration for columns and AuthProvider enum that were in the Prisma schema but never migrated (likely applied via db:push locally only)
  • Missing columns (name, image, provider, provider_id, onboarding_completed, onboarding_path, onboarding_completed_at) caused prisma.user.create() to fail on production, returning a generic "An error occurred during registration" 500 error
  • Also makes password_hash nullable (required for OAuth users) and adds the composite unique index on (provider, provider_id)

Test plan

  • Run npm run db:migrate against production database
  • Verify new user registration completes successfully
  • Verify existing users can still log in
  • Verify Google OAuth signup still works

Several columns (name, image, provider, provider_id, onboarding_*)
and the AuthProvider enum were added to the Prisma schema but never
turned into a migration. Production databases missing these columns
cause registration to fail with a 500 error.
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cheesebox Ready Ready Preview, Comment Mar 16, 2026 10:02pm

@onamfc onamfc merged commit 7d2f5cd into main Mar 16, 2026
5 checks passed
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