-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pouchdb-adapter-leveldown does not assure folders #5668
Comments
This commit includes a workaround for pouchdb/pouchdb#5668 This is a breaking change. If your app used the leveldb adapter (or another adapter that stores files) and you have database names containing `/`, then your app won’t be able to find the existing databases, as they are in folders like `user%2Fabc4567` instead of nested folders like `user/abc4567`. To migrate, look into the folder where you save your databases into and rename all database folders accordingly
This commit includes a workaround for pouchdb/pouchdb#5668 This is a breaking change. If your app used the leveldb adapter (or another adapter that stores files) and you have database names containing `/`, then your app won’t be able to find the existing databases, as they are in folders like `user%2Fabc4567` instead of nested folders like `user/abc4567`. To migrate, look into the folder where you save your databases into and rename all database folders accordingly
This commit includes a workaround for pouchdb/pouchdb#5668 This is a breaking change. If your app used the leveldb adapter (or another adapter that stores files) and you have database names containing `/`, then your app won’t be able to find the existing databases, as they are in folders like `user%2Fabc4567` instead of nested folders like `user/abc4567`. To migrate, look into the folder where you save your databases into and rename all database folders accordingly
* (#374) update to PouchDB@6 * (#274): remove incorret dbname encoding This commit includes a workaround for pouchdb/pouchdb#5668 This is a breaking change. If your app used the leveldb adapter (or another adapter that stores files) and you have database names containing `/`, then your app won’t be able to find the existing databases, as they are in folders like `user%2Fabc4567` instead of nested folders like `user/abc4567`. To migrate, look into the folder where you save your databases into and rename all database folders accordingly
I don't see any reason not to do the mkdirp. 👍 |
It has come up a few times before but I purposefully left it out, I think its the responsibility of the backend to ensure this type of functionality, in particular whoever chooses where to store the data should be the one to ensure that it exists, otherwise we will be creating directories when not needed / things go out of sync etc I think added support for this should be done in leveldown, or at least we should understand why leveldown doesnt do it (maybe it could be an option we set by default) |
Yeah I'm also fine with just punting on this. However I think a defensive mkdirp is pretty costless. |
On second thought, I disagree when it comes to database names with with a I agree that we should investigate why this is not part of leveldown though |
Users can do this fairly easily themselves, not having to include |
Issue
I would assume that if I create a new database containing a path separator like
new PouchDB('foo/bar')
then it’s the responsibility of the adapters to make sure that thefoo
folder gets created before it tries to write files, but it doesn’t seem to be the case right now?Would you accept a PR to fix that, or is that by design?
Info
Reproduce
Workaround
The text was updated successfully, but these errors were encountered: