Custom Tables | SQL Schema
:nuxt: Help me understand how Better-Auth works with the DB.
Better-Auth has its required core schema for the 4 core tables. For
But then I think I need to tell better-auth about them, and here comes the question about the Better-Auth accepted TS types vs PostgreSQL types I need.
PS: I'm working with Nuxt, PostgreSQL, Drizzle ORM [though I'm trying to avoid the latter, if I can]
Better-Auth has its required core schema for the 4 core tables. For
id uses string [I'm looking at the core schema] and the generated SQL gets a text type, for example.- If I create all tables on my own [Better-Auth Tables + other needed tables] and set that up at the DB level, does the
instance still need to know about all of them, i.e. via me configuring theauth
object [for a custom field I added on thebetter-auth
table] and creating my own plugin [for the extra tables]?user - Also, if I, upon creating my DB tables, set the
PK field toid
, willuuid
have problems with that?better-auth - On my
table, I (want to) have auser
field which is a PostgreSQL Enum Type [just a couple of string options]. I can't set that on Better-Auth, as it only accepts string, number, etc. - is it okay for me, when configuringuser_type
, to set the field type asbetter-auth
, when it is, in reality [at the DB level] an enum?string - Does Better-Auth rely on the DB to auto, randomly generate the IDs or does it pass the id on every, say, user creation, for instance?
But then I think I need to tell better-auth about them, and here comes the question about the Better-Auth accepted TS types vs PostgreSQL types I need.
PS: I'm working with Nuxt, PostgreSQL, Drizzle ORM [though I'm trying to avoid the latter, if I can]