Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: added missing type to authenticator table of drizzle postgres adapter #11974

Merged

Conversation

nicholasdly
Copy link

@nicholasdly nicholasdly commented Oct 5, 2024

☕️ Reasoning

If a user decides to modify the default schema for the user table by changing the type of the id column from text to uuid (and then update the related tables), the user will be met with a type error when attempting to use their custom authenticator table.

The issue is small, and is because the type definition for a valid authenticator table is missing the PgUUID option for the userId column.

🧢 Checklist

  • Documentation
  • Tests
  • Ready to be merged

🎫 Affected issues

Somewhat related, but does not entirely address #9203. I wanted to make sure this bug was fixed before I make another pull request for adding support for the serial type (if needed).

📌 Resources

@nicholasdly nicholasdly requested a review from ndom91 as a code owner October 5, 2024 05:50
Copy link

vercel bot commented Oct 5, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
auth-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 6, 2024 11:42pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
next-auth-docs ⬜️ Ignored (Inspect) Visit Preview Oct 6, 2024 11:42pm

Copy link

vercel bot commented Oct 5, 2024

@nicholasdly is attempting to deploy a commit to the authjs Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions bot added adapters Changes related to the core code concerning database adapters drizzle @auth/drizzle-adapter labels Oct 5, 2024
@balazsorban44 balazsorban44 merged commit 9170801 into nextauthjs:main Oct 6, 2024
6 of 7 checks passed
@nicholasdly nicholasdly deleted the fix/drizzle-pg-invalid-column-type branch October 6, 2024 23:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adapters Changes related to the core code concerning database adapters drizzle @auth/drizzle-adapter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants