anlek / mongify

Mongify allows you to map your data from a sql database and into a mongodb document database.
http://github.com/anlek/mongify
MIT License
315 stars 82 forks source link

Sy command option work? Some documentantion how to used it? #169

Open Jankko opened 6 years ago

Jankko commented 6 years ago

root@MongiUbu:/var/lib/gems/2.2.0/gems/mongify-1.3.2# mongify sy database.config translation.rb /var/lib/gems/2.2.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/mysql_adapter.rb:3 46:in query': Mysql::Error: Unknown column 't.updated_at' in 'where clause': SELECT t.* FROM departm ents t, __mongify_sync_helper__ u WHERE t.updated_at > u.last_updated_at AND u.table_name = 'departme nts' (ActiveRecord::StatementInvalid) from /var/lib/gems/2.2.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/mysql _adapter.rb:346:inblock in exec_without_stmt' from /var/lib/gems/2.2.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstr act_adapter.rb:484:in block in log' from /var/lib/gems/2.2.0/gems/activesupport-4.2.10/lib/active_support/notifications/instrumen ter.rb:20:ininstrument' from /var/lib/gems/2.2.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstr act_adapter.rb:478:in log' from /var/lib/gems/2.2.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/mysql _adapter.rb:345:inexec_without_stmt' from /var/lib/gems/2.2.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/mysql _adapter.rb:255:in exec_query' from /var/lib/gems/2.2.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstr act/database_statements.rb:356:inselect' from /var/lib/gems/2.2.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/mysql _adapter.rb:479:in select' from /var/lib/gems/2.2.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstr act/database_statements.rb:32:inselect_all' from /var/lib/gems/2.2.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstr act/query_cache.rb:70:in select_all' from /var/lib/gems/2.2.0/gems/mongify-1.3.2/lib/mongify/database/sql_connection.rb:108:inse lect_by_query' from /var/lib/gems/2.2.0/gems/mongify-1.3.2/lib/mongify/translation/sync.rb:61:in block in s ync_data' from /var/lib/gems/2.2.0/gems/mongify-1.3.2/lib/mongify/translation/sync.rb:58:ineach' from /var/lib/gems/2.2.0/gems/mongify-1.3.2/lib/mongify/translation/sync.rb:58:in sync_data' from /var/lib/gems/2.2.0/gems/mongify-1.3.2/lib/mongify/translation/sync.rb:29:insync' from /var/lib/gems/2.2.0/gems/mongify-1.3.2/lib/mongify/cli/command/worker.rb:75:in execute' from /var/lib/gems/2.2.0/gems/mongify-1.3.2/lib/mongify/cli/application.rb:28:inexecute!' from /var/lib/gems/2.2.0/gems/mongify-1.3.2/bin/mongify:17:in <top (required)>' from /usr/local/bin/mongify:23:inload' from /usr/local/bin/mongify:23:in `

'

anlek commented 6 years ago

Looks like you might have some hidden characters in your setup. Your departments has a space between the m and the e (so the system sees it as departm ents). Try retyping the name in the translation file.