Add support for Drizzle sqlite integer timestamp mode - #1629
Conversation
pilcrowonpaper
left a comment
There was a problem hiding this comment.
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.