drizzle-orm
drizzle-orm copied to clipboard
[mysql] Stop truncating timestamp milliseconds
The mysql Timestamp column's mapToDriverValue
method was incorrectly truncating everything after the seconds when serializing Date objects to strings. This commit preserves the milliseconds. Note that this only applies to {mode: 'date'}
; the string mode doesn't seem to have this same problem.
I noticed that there's a variety of other bugs related to time precision in the mysql adapter. I'll continue to look at ways to improve it, but I wanted to at least get this fix in.
Whoops, sorry about that! I rebased, amended my commit with the signed version, and force pushed. Let me know if there's anything else I need to do.
Done.
Has your team talked about making dprint linting integrated more directly into the repo? E.g. adding a script in package.json, or making it a pre-commit hook to ensure that it's happening? I'd be happy to add that, but didn't know if you were intentionally not doing it for some reason.
Hi @dankochetov, could I get this merged in? It would be great to not have to continue using the forked version and having to keep it up-to-date with the upstream.