[GH-ISSUE #6835] Docs: API Key table name should be apikey not apiKey #10648

Closed
opened 2026-04-13 06:54:25 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @thewh1teagle on GitHub (Dec 17, 2025).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/6835

Docs for the API key plugin at https://www.better-auth.com/docs/plugins/api-key#schema
show the table name as apiKey (camelCase) but the implementation uses apikey (lowercase).

This mismatch causes Postgres errors when users create migrations based on the docs (relation apikey does not exist)

Originally created by @thewh1teagle on GitHub (Dec 17, 2025). Original GitHub issue: https://github.com/better-auth/better-auth/issues/6835 Docs for the API key plugin at https://www.better-auth.com/docs/plugins/api-key#schema show the table name as apiKey (camelCase) but the implementation uses apikey (lowercase). This mismatch causes Postgres errors when users create migrations based on the docs (relation apikey does not exist)
GiteaMirror added the locked label 2026-04-13 06:54:25 -05:00
Author
Owner

@better-auth-agent[bot] commented on GitHub (Dec 17, 2025):

Thanks for flagging this! It looks like there's a mismatch between the documentation and the actual implementation: the docs show the table name as “apiKey” while the code uses “apikey,” which can cause issues with case sensitivity in Postgres. The recommended next step is to update your migration scripts to use “apikey” as the table name. Our team is aware of this discrepancy and we’re working on updating the docs to reflect the correct table name.

Tag @better-auth-agent if you would like an answer from the Agent.

Could you let us know if this workaround resolves your issue or if you’re running into any additional obstacles?

If you need more help, tag @better-auth-agent in a comment so I can respond.

DiagramDiscordGitHub

Diagram Join Star

<!-- gh-comment-id:3666953539 --> @better-auth-agent[bot] commented on GitHub (Dec 17, 2025): Thanks for flagging this! It looks like there's a mismatch between the documentation and the actual implementation: the docs show the table name as “apiKey” while the code uses “apikey,” which can cause issues with case sensitivity in Postgres. The recommended next step is to update your migration scripts to use “apikey” as the table name. Our team is aware of this discrepancy and we’re working on updating the docs to reflect the correct table name. Tag @better-auth-agent if you would like an answer from the Agent. Could you let us know if this workaround resolves your issue or if you’re running into any additional obstacles? _If you need more help, tag @better-auth-agent in a comment so I can respond._ <!-- bot:webhook reply v1 --> [Diagram](https://repodiagrams.s3.eu-north-1.amazonaws.com/skyvern_ultra_detailed_interactive.html) • [Discord](https://discord.gg/fG2XXEuQX3) • [GitHub](https://github.com/Skyvern-AI/Skyvern) [![Diagram](https://img.shields.io/badge/Diagram-2b3137?style=flat-square)](https://repodiagrams.s3.eu-north-1.amazonaws.com/skyvern_ultra_detailed_interactive.html) [![Join](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&style=flat-square)](https://discord.gg/fG2XXEuQX3) [![Star](https://img.shields.io/badge/star-181717?logo=github&logoColor=white&style=flat-square)](https://github.com/Skyvern-AI/Skyvern)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#10648