[mysql] Stop truncating timestamp milliseconds#668
[mysql] Stop truncating timestamp milliseconds#668AndriiSherman merged 4 commits intodrizzle-team:mainfrom
Conversation
dankochetov
left a comment
There was a problem hiding this comment.
Thanks for the contribution!
We require all commits to our codebase to be signed. Please sign them and force-push.
|
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. |
dankochetov
left a comment
There was a problem hiding this comment.
Please use dprint to format the code you've changed.
The Mysql timestamp was incorrectly truncating everything after the seconds when serializing Date objects to strings. This commit preserves the milliseconds.
|
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. |
This one is fixed. I don't know how to close review in some other way
The mysql Timestamp column's
mapToDriverValuemethod 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.