willbryant/kitchen_sync

Fractional seconds precision in DATETIME is not supported

Closed this issue · 5 comments

When running Kitchen Sync with MySQL as a source, getting the following error:

Don't know how to interpret type of xxx.created_at (datetime(6))

Is there a way to workaround it?

Ref: https://dev.mysql.com/doc/refman/8.0/en/datetime.html

Hmm yeah I'd better add support for that.

In the meantime you could test with the origin/unsupported branch, which has some WIP for arbitrary non-portable type support that will end up in KS 2.0.

It... works, but (trying to do mysql -> postgres):

ERROR:  type "datetime" does not exist
LINE 3:   "created_at" datetime(6) NOT NULL,
                       ^

Ref: https://stackoverflow.com/questions/38826799/error-type-datetime-does-not-exist

OK, try origin/time_precision. It should be portable now as for regular datetime columns before.

Let me know how it goes and I can merge it.

Finished Kitchen Syncing. 💪

Man, compatibility with older versions was pretty painful, but done now and merged.