News for hackers. Stuff that matters.
Re:Why you should never, ever, ever use MongoDB by eindiran on Saturday November 03, 2018 @12:27AM (#18368694)
Has anyone had any success migrating from MongoDB over to Postgres? My team and I decided to try out MongoDB for a new app we wrote because the data model seemed to fit the idea of a schema-less document quite well. But many months later, Mongo has caused a few more headaches than its been worth and we are slowly leaning towards using a more traditional data model.

I was thinking that one approach might be first to just keep the schema-less data model and move over to using Postgres JSON. Once that is stable, then think about how we would move over to using schemas. Any thoughts on whether that is a plausible approach?

Re:Why you should never, ever, ever use MongoDB by nchudleigh on Saturday November 03, 2018 @01:44AM (#18368919)
Would recommend straight into schema if you have the time- but if you must do it incrementally, then yea this will work. The JSONB columns are extremely powerful.
Re:Why you should never, ever, ever use MongoDB by matthewmacleod on Saturday November 03, 2018 @05:11AM (#18369343)
That’s plausible for sure.

The company I worked for until recently maintains a core data store in Mongo, but mirrors the content into a Postgres database for use by other, newer applications (which don’t modify the data).

We built a tool which streams the MongoDB Oplog into tables containing a JSONB column for the document - https://github.com/mudge/oplogjam - and it has been pretty good to work with. Sefilitely am approach than can work well in my experience, though!