Closed loxator closed 2 years ago
Bug reports without a minimal reproducible example will be closed (https://stackoverflow.com/help/minimal-reproducible-example). Ideally, the example should be accessible somewhere public, like jsbin, Glitch, jsfiddle, codepen etc etc.
I'll happily reopen this if you create a runnable demo of the issue, although you may discover the answer yourself while creating that demo.
@jakearchibald thanks for the idea! I tried it out and understood that the only way to make changes to the DB is to open a transaction with a larger version number than the previous one.
My use-case is that I need to drop some stores while keeping one intact with its data. Then when the application runs again, create the dropped object stores, whilst keeping the version the same. Not sure if this is possible without incrementing the version number.
Yeah, you can only delete stores within a schema update. If you need to do something throughout the life of the database, maybe create another store which maintains which stores are 'active'?
Got it, thanks for taking the time out and replying!
How do I drop the created object stores? I have tried the following but don't see the changes being reflected in the indexedDB, the function runs without any errors. Thank you for your help!