When I try to delete a IndexedDB Index in onupgradeneeded, I get one of 2 errors depending on whether I include the 1st statement below or not.
With the 1st statement, I get an exception saying “A version change transaction is running”, indicating that I can’t initiate a new transaction.
Without the 1st statement, I get “Cannot read properties of undefined (reading ‘deleteIndex’)”, indicating I need the transaction.
So how can I delete the Index from the database? I’d like to do this in js, but would be ok to use Chrome’s devtools as a backup. Thanks for any help you can provide.
myStore = myDatabase.transaction(myStoreName,"readwrite").objectStore('myStoreName');
myStore.deleteIndex('myIndex');