BA
Better Auth•4w ago
Cross

Update TypeScript types of the user ID table

Hello, I looked at different posts here and I understand that the ID from the user table can't be changed but I've modified my SQLite database schema to use an integer type for the primary id column of the user table (because I did a migration and I need to keep the IDs). Now, I'm have TypeScript errors when working with this ID (e.g., during comparisons or when fetching user data). TypeScript expects the id to be a string and sometimes an integer, which create a type mismatch. Can someone help me on how to update the TypeScript types definitions (interfaces, types, etc.) to reflect that the id field should now be a number? (I'm new to typescript, so I don't even know if it is possible ^^) Thanks in advance 🙂
2 Replies
bekacru
bekacru•4w ago
integer IDs stil cause some problems. If you must use integer IDs, we're working on a PR that makes this much easier so I'd wait for that.
Cross
CrossOP•4w ago
Ok thanks for the quick answer 🙂

Did you find this page helpful?