4 ms·
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 seeme
by eindiran 8y ago
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?
- nchudleigh 8y agoWould 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.
- matthewmacleod 8y agoThat’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 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!