-
-
Notifications
You must be signed in to change notification settings - Fork 501
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Drizzle sqlite integer timestamp mode #1629
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also add tests? You can just copy the sqlite.ts
test file and change the column types
@pilcrowonpaper Any chance for a review on this? |
Yeah I was wondering if I could @AndriiSherman to confirm that using |
Honestly might be smarter and safer to have export |
Yea tbh I don't really mind the specific implementation. Whatever you think is best. Although if we do it like that I reckon they should probably share some logic where applicable. Want me to do a branch of it to see what it'd look like? |
I don't really might code duplication that much but yeah can you do a quick prototype? |
And just to clarify, which different versions of Drizzle are you referring to? |
Good to know, don't need to do anything complicated then. Will do a prototype and push it on a different PR when I get home, unless you want it pushed in this branch instead? |
@AndriiSherman Anything above 0.29.0 |
@LinusOP You can create a branch and probably just share the link here |
Here you go: https://github.com/LinusOP/lucia/tree/drizzle-sqlite-timestamp-separate |
Fixes #1628
Quite a simple thing to support, simply checks if Drizzle already returned a date for us and if so it skips the conversion.
I've tested this in an existing project I had using the Drizzle adapter with SQLite and it worked without issue.
Also added a small comment to explain when this might occur.