Data Types MSSQL
Hi all. Not sure if this is a bug or just a lack of knowledge on my part.
I have a next.js project using a mssql db and have generated/ migrated schema as per docs for all of the plugins. I've been setting up forgot password and update password but hitting an error with data types. For forgot password, the error occurs when the user has clicked on the link in the email (verifying the token??), and with update password, the error looks to be a call for accountId when it's writing the new password to the db.
Error: The data types text and nvarchar are incompatible in the equal to operator.
The schema has a number of fields as 'text' such as the tokens, accountId's etc but mssql no longer supports text as a data type so the db errors out on api calls that use these fields. I've manually updated the columns in my db to be varchar or nvarchar which has resolved the issue.
I updated better-auth from 1.2.3 to 1.2.6 which also meant the twofactor verification failed as the verification table is also set up with text.
I presume though that this is actually a bug for kyseley with a knock on impact here???0 Replies