[GH-ISSUE #568] Use of a custom user table name which cause the twoFactor table a bug #16954

Closed
opened 2026-04-15 14:54:11 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @Limerio on GitHub (Nov 17, 2024).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/568

Describe the bug
When you do a migration with the cli, you have the twoFactor plugin, and you update the user modelName option. That will cause an error : Table "user" does not exist

To Reproduce
Steps to reproduce the behavior:
I assumed that you have already configure the database

  1. Change the modelName of the user option to whatever you want
  2. Add in the plugins list the MFA plugin
  3. Do a migration

Expected behavior
The migration works as normal.

Desktop (please complete the following information):

  • OS: MacOS
  • Browser: Arc
  • Version: 1.69

Additional context
Add any other context about the problem here.

Originally created by @Limerio on GitHub (Nov 17, 2024). Original GitHub issue: https://github.com/better-auth/better-auth/issues/568 **Describe the bug** When you do a migration with the cli, you have the twoFactor plugin, and you update the user modelName option. That will cause an error : `Table "user" does not exist` **To Reproduce** Steps to reproduce the behavior: _I assumed that you have already configure the database_ 1. Change the `modelName` of the `user` option to whatever you want 2. Add in the plugins list the MFA plugin 3. Do a migration **Expected behavior** The migration works as normal. **Desktop (please complete the following information):** - OS: MacOS - Browser: Arc - Version: 1.69 **Additional context** Add any other context about the problem here.
GiteaMirror added the locked label 2026-04-15 14:54:11 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#16954