Typescript error on plugin schema reference field
When creating plugin for table schema, and adding reference to another table (e.g.
user
) I get TS error that instaed of reference
it should be references
My code:
10 Replies
can you share your full plugin schema defination
oh it's
references
not reference
Is it? Because when I change to references I get an error during migration.
With
reference
everything works findwhat is the error?
can't tell you specifically, just that when using
reference
it is successful and also in documentation it's reference
instead of references
maybe remove onDelete cascade
incase that's the issue
Already tried that, it doesn't help
so
npx @better-auth/cli migrate
is failing when you add references
?Well at least for me. Only works when it is reference