apiary icon indicating copy to clipboard operation
apiary copied to clipboard

Migrate to Postgres

Open onbjerg opened this issue 4 years ago • 1 comments

We should consider moving away from MongoDB and using something like Postgres instead.

MongoDB was the correct choice in terms of iterating quickly when Apiary was smaller, since there was no need to manage a rapidly evolving schema. However, MongoDB's schemaless nature can also be a curse.

As Apiary is growing technically, I grow less confident of changing the schema when new features are added because I fear I might break something else that depended on an older part of the schema. It's really quite hard to catch since the database will not do it for you.

I think having a more rigid schema will serve us in the long run, seeing as we have a better sense of where this project is going.

My thoughts on a super simple schema for now would be something like this:

https://i.imgur.com/GCNZctK.png

onbjerg avatar Jan 09 '20 15:01 onbjerg