简体   繁体   中英

From mongod to pouchdb/couchdb

I want to migrate my app from mongodb to pouchdb/couchdb for the syncing. But I am lost. My app has 20 collections in a mongo database. One collection holds the users, who can only view content they created in the other collections, using their ids. I implemented my own user management system. Now, with 'one database per user', do i have to create 19 databases for each user or put everything into one database?

Since CouchDB 1.6.1 does not support permission on document level, you have 4 options as I see it:

  1. To use fork of Couch DB called rCouch - here

  2. Wait for CouchDB 2.0 that will merge the codebase of rCouch and CouchDB and allow you to use user permission on document level

  3. Use Couchbase and Couchbase sync gateway with PouchDB that will allow you to define rights per documents
  4. Go with one db per user in CouchDB

Good luck with whatever you choose. Couchbase sync gateway in my personal opinion is not easy.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM