mongify icon indicating copy to clipboard operation
mongify copied to clipboard

Map updated_at to another column

Open chevdor opened this issue 9 years ago • 7 comments

Hello,

I would like to use the 'sync' feature but my table does not have an 'updated_at' column. It has a similar column with another name: 'Timestamp'. How can I tell mongify to check out another column for the sync date ?

chevdor avatar Feb 23 '16 17:02 chevdor

Might be a bug, @hammady any thoughts on this?

anlek avatar Mar 26 '16 17:03 anlek

Currently the name of the field is hard-coded to updated_at. A workaround is to create a view of your table with only the Timestamp changed to updated_at.

hammady avatar Mar 26 '16 18:03 hammady

any progress on it

srizviOfficial avatar Dec 05 '16 13:12 srizviOfficial

Sorry @srizviOfficial, I have no ability to work on Mongify at this moment, maybe in a few months I'll be able to take this on. However, the floor is open for a PR, it's most likely a simple tweak to do.

anlek avatar Dec 10 '16 01:12 anlek

Hey guys! Any workarounds on this issue?

romafederico avatar Jun 21 '17 08:06 romafederico

Have you tried , https://www.npmjs.com/package/pre-sync-mongify

I had the same issue i solved it with this.

But I will suggest that you should try on test environment first.

It basically updates all the tables in the MYSQL And sets up some triggers on Update.

kunalmestri9 avatar Jun 21 '17 12:06 kunalmestri9

Wow, that's interesting 👍 However, it wouldn't be hard to extract the option for the update_at column in the sync code. I'm unable to take it on but am willing to review anyone's code that would want to try to take it on.

anlek avatar Jun 22 '17 16:06 anlek