Skip to content


Subversion checkout URL

You can clone with
Download ZIP


destroy() does not actually delete IndexedDB database #1583

perliedman opened this Issue · 5 comments

3 participants


When destroying a database, the wrong name is used when calling indexedDB.deleteDatabase.

To reproduce:

var db = new PouchDB('test');

When the database is opened, the name _pouch_test is passed to When indexedDB.deleteDatabase is called, it is passed the name _pouch_EFA06E9B-996E-4500-8906-E130D41C24C7. The result is that the database _pouch_test is never deleted.

Tested with 2.0.0 and the nightly build from 2014-03-06 on Chrome 33 for Windows.


that would because it's deleting based on the id not the name even though those used to be the same thing


(in the mean time you can use PouchDB.destroy('test'))


god this is going to be why a lot of the tests are wonky


we only do 3 db.destroys in the tests and teardown should catch it, I dont think it will effect the tests

But yeh we defeinitely wanna test this, we had the same test for PouchDB.destroy to ensure the data had gone


fixed in: 5b66897

@daleharvey daleharvey closed this
@sygi sygi referenced this issue from a commit in sygi/pouchdb
@calvinmetcalf calvinmetcalf (#1583) - properly destroy idb (and websql) f2e0793
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.