mongify
mongify copied to clipboard
Pls help me abt Mongify sync Command
Pls give some tutorial abt mongify sync.
Iam getting this error.
Iam Added update_at datetime field in mysql.
/usr/local/share/gems/gems/mongify-1.2.4/lib/mongify/translation/sync.rb:74:in block in sync_data': undefined methodname' for nil:NilClass (NoMethodError)
from /usr/local/share/gems/gems/mongify-1.2.4/lib/mongify/translation/sync.rb:58:in each' from /usr/local/share/gems/gems/mongify-1.2.4/lib/mongify/translation/sync.rb:58:insync_data'
from /usr/local/share/gems/gems/mongify-1.2.4/lib/mongify/translation/sync.rb:29:in sync' from /usr/local/share/gems/gems/mongify-1.2.4/lib/mongify/cli/command/worker.rb:71:inexecute'
from /usr/local/share/gems/gems/mongify-1.2.4/lib/mongify/cli/application.rb:28:in execute!' from /usr/local/share/gems/gems/mongify-1.2.4/bin/mongify:15:in<top (required)>'
from /usr/local/bin/mongify:23:in load' from /usr/local/bin/mongify:23:in
Hey @kshitijpal, Sorry to hear you're having troubles, the sync feature was added by @hammady, I'm hoping he will be able to help you.
@kshitijpal it seems you don't have a column of type :key in your translations file. You must denote your primary key as such or else sync won't work.
hi kshitijpal, did you managed to connect mongify with your mongodb database above version 3.0? I currently have some issue with connect the database with username and password, if you managed to do that, it will be great you can share how you did that, cheers
@hammady
This is my campaign Table which i want to sync in Mongodb
##This sis my Transaltion File ## table "campaign" do column "campaignid",:key, :as => :integer column "campaign_name_short", :string column "updated_at", :timestamps end
##This is my Database.config## sql_connection do adapter "mysql" host "localhost" username "root" password "admin" database "mongo_sync" encoding "utf8" end
mongodb_connection do host "localhost" database "mongo_sync" end
Case 1: First Command i run For Db Migration :
mongify process database.config translation-differentsync.rb
Then i run run Sync Command For Sync:
mongify sync database.config translation-differentsync.rb
After This in mongodb there is one old record and one updated record with different id but sync means mongify has to update the record in mongdb not to create duplicate entry
@kshitijpal as stated in the README you must run sync from the start.
@hammady ,
I run sync command first not process but it will not sync the data. Pls help its urgent. or if possible can u please create a tutorial video like this(http://mongify.com/ home page ) for sync .
Regards Kshitij
hammady,
in my mysql table that is created by mongify sync (mongify_sync_helper) column last_updated_at is not updated pls help. Regards Kshitij
I will have a look.
On Wed, Jan 6, 2016 at 5:45 PM Kshitij Pal [email protected] wrote:
hammady,
in my mysql table that is created by mongify sync (mongify_sync_helper) column last_updated_at is not updated pls help. Regards
Kshitij
— Reply to this email directly or view it on GitHub https://github.com/anlek/mongify/issues/79#issuecomment-169341785.
Thank you for your help @hammady!