Replies: 3 comments
-
This is possible for certain adapters, and I've been experimenting with it in another project (that also uses adapters) |
Beta Was this translation helpful? Give feedback.
-
Are there any public examples of this? If not for the time being I may just need to recreate the planetscale (mysql2) adapter to support the custom tables names. Out of curiosity, which adapters are causing blockers on the custom table names? |
Beta Was this translation helpful? Give feedback.
-
No, ok, with the new driver adapters, I think all the adapters can support custom table names. Prisma might require some workarounds but it should be fine. Are there any public examples of this? I meant a database adapter for a project that has nothing to do with this library. |
Beta Was this translation helpful? Give feedback.
-
Description
I have a use-case, where I need to have two sets/groups of users for a general client application and a super admin application (with a possibility to expand and add a 3rd set at a later point), with the data for all having to live in the same database.
As such, I wanted to know if would it be possible to extend the official adapters to optionally add in custom table names differing from the default names of auth_users, auth_sessions, and auth_keys? as the fixed table names would cause a collision amongst the different datasets.
The only alternative to this currently, would be to roll your own adapter. However, I do think this is quite an extreme pivot since the only difference in the implementations would be table names. From my understanding, the Adapters are more for the use-case where you need to store data in an unsupported datastore.
Beta Was this translation helpful? Give feedback.
All reactions