stripe-archive / mosql

MongoDB → PostgreSQL streaming replication
MIT License
1.63k stars 225 forks source link

MoSQL::Schema::PGError (NameError) #133

Open thejusss opened 6 years ago

thejusss commented 6 years ago

Hi,

When I run the command mosql --collections collections.yml --skip-tail for importing data from Mongo db to Postgre, I am getting the following error.

`rescue in block in copy_data': uninitialized constant MoSQL::Schema::PGError (NameError)

SQL Tables are creating successfully. But the data is not imported.

Any idea about this issue?

psantwani commented 5 years ago

@thejusss, Were you able to make this work ?

psantwani commented 5 years ago

@thejusss I was getting the same error. I was using an unsupported data type called UUID in my collections.yml. Replaced it with CHARACTER VARYING and I was able to successfully import the data.

sneerin commented 5 years ago

from a performance perspective, UUID is much better comparing to CHAR, that's very important due to nature of MongoDB id.

epaolillo commented 4 years ago

Solved! Just downgrade the 'pg' gem version to 0.21 version. The constants PGError and another similar are deprecated from 1.0.0 'pg' gem version.