by mwhite · 10y ago · 0 comments
Specifically, a JSON column should be used to store everything other than primary keys and foreign keys, and views and indexes should be automatically created based on the schema defined in the application (i.e., get the schema from the ORM at deploy time and post the data to a schema/migration management system) using something like https://github.com/mwhite/JSONAlchemy
It is entirely possible to implement the CouchDB or MongoDB API on top of Postgres JSON, for instance.
One option is PouchDB, with levelDOWN* to push it to levelUP* to store it in postgres. But the level of abstraction feels just to much.
I also found another project that basicly keeps a copy in couchdb and sync it over to pg, but stuff like attachments does not work.
* I'm not 100% sure about the projects and how to accomplish it.
Sure, but that's just because someone has gone to the trouble of building a Mongo-equivalent as a Postgres module.